added working graphql 4 module and started materio_graphql
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
type Mutation
|
||||
|
||||
scalar Violation
|
||||
|
||||
type Materiau {
|
||||
id: Int!
|
||||
uuid: String!
|
||||
title: String!
|
||||
author: String
|
||||
memo: String
|
||||
linked_materials: [Materiau]
|
||||
images: [Image]
|
||||
}
|
||||
|
||||
type MateriauResponse implements Response {
|
||||
errors: [Violation]
|
||||
materiau: Materiau
|
||||
}
|
||||
|
||||
interface Response {
|
||||
errors: [Violation]
|
||||
}
|
||||
|
||||
input MateriauInput {
|
||||
title: String!
|
||||
description: String
|
||||
}
|
||||
|
||||
type Image {
|
||||
id: Int!
|
||||
url: String!
|
||||
alt: String
|
||||
style_minicard: ImageStyle
|
||||
}
|
||||
|
||||
type ImageStyle {
|
||||
width: Int
|
||||
height: Int
|
||||
url: String
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
extend type Query {
|
||||
materiau(id: Int!): Materiau
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createMateriau(data: MateriauInput): MateriauResponse
|
||||
}
|
Reference in New Issue
Block a user