2022-03-01 10:07:50 +01:00
|
|
|
type Book {
|
|
|
|
|
title: String!
|
|
|
|
|
author: Author
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Author {
|
|
|
|
|
name: String!
|
|
|
|
|
surname: String!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Query {
|
|
|
|
|
allBooks: [Book]
|
2022-04-21 16:01:36 +04:00
|
|
|
products(size: Int, page: Int): [Product]!
|
|
|
|
|
product(id: Int): Product!
|
2022-03-01 10:07:50 +01:00
|
|
|
}
|
|
|
|
|
|
2022-04-21 16:01:36 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
2022-03-01 10:07:50 +01:00
|
|
|
schema {
|
|
|
|
|
query: Query
|
|
|
|
|
}
|