https://github.com/imega/graphql2avro
https://github.com/imega/graphql2avro
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/imega/graphql2avro
- Owner: iMega
- Created: 2019-09-01T10:28:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-01T10:29:26.000Z (almost 7 years ago)
- Last Synced: 2025-05-24T20:02:07.751Z (about 1 year ago)
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Graphql2Avro
### Graphql
```
type Query {
collection(id: ID): Collection!
}
interface Node {
id: ID!
}
type Collection implements Node {
id: ID!
title: String!
description: String!
items(offset: Int, limit: Int): CatalogItemCollection
}
type CatalogItemCollection {
totalCount: Int!
entities(offset: Int, limit: Int): [CatalogItem]
}
union CatalogItem = Product | Collection
type Product implements Node {
id: ID!
title: String!
description: String!
sku: String
}
```
### Avro
```
{
"namespace": "ru.imega.collection",
"type": "record",
"name": "collection",
"aliases": ["version", "1.0"],
"doc": "collection data",
"fields" : [
{"name": "id", "type": "string"},
{"name": "title", "type": "string"},
{"description": "title", "type": "string"}
]
}
{
"namespace": "ru.imega.product",
"type": "record",
"name": "product",
"aliases": ["version", "1.0"],
"doc": "product data",
"fields" : [
{"name": "id", "type": "string"},
{"name": "title", "type": "string"},
{"description": "title", "type": "string"},
{"sku": "title", "type": "string"}
]
}
```