added working graphql 4 module and started materio_graphql

This commit is contained in:
2020-12-09 22:55:16 +01:00
parent 2fbba0fe7f
commit 2071a99ca2
16 changed files with 525 additions and 27 deletions

View File

@@ -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
}

View File

@@ -0,0 +1,7 @@
extend type Query {
materiau(id: Int!): Materiau
}
extend type Mutation {
createMateriau(data: MateriauInput): MateriauResponse
}