43 lines
533 B
GraphQL
43 lines
533 B
GraphQL
type Book {
|
|
title: String!
|
|
author: Author
|
|
}
|
|
|
|
type Author {
|
|
name: String!
|
|
surname: String!
|
|
}
|
|
|
|
type Query {
|
|
allBooks: [Book]
|
|
products(size: Int, page: Int): [Product]!
|
|
product(id: Int): Product!
|
|
}
|
|
|
|
|
|
|
|
type Product {
|
|
id: ID
|
|
name: String!
|
|
description: String
|
|
attribute_string:String
|
|
attribute_list:[AttributeKeyValuePair]
|
|
attributes: JSON
|
|
}
|
|
|
|
type AttributeKeyValuePair {
|
|
key:String
|
|
value:Attribute
|
|
}
|
|
|
|
type Attribute {
|
|
name:String
|
|
description:String
|
|
unit:String
|
|
}
|
|
scalar JSON
|
|
|
|
|
|
schema {
|
|
query: Query
|
|
} |