frist graphql query to materio_graphql schema is working

going to refactor every thing with graphql
This commit is contained in:
2020-12-10 22:46:27 +01:00
parent 2071a99ca2
commit 2739df96e2
14 changed files with 1087 additions and 47 deletions

View File

@@ -1,5 +1,3 @@
type Mutation
scalar Violation
type Materiau {
@@ -12,18 +10,35 @@ type Materiau {
images: [Image]
}
type MateriauResponse implements Response {
errors: [Violation]
materiau: Materiau
}
interface Response {
errors: [Violation]
}
input MateriauInput {
type Article {
id: Int!
uuid: String!
title: String!
description: String
author: String
body: String
linked_materials: [Materiau]
images: [Image]
videos: [VideoLink]
# date: [String]
# showroom: [Showroom]
# source: Link
# tags: []
# thesaurus: []
}
# type Showroom {
# id: Int!
# uuid: String!
# }
#
#
# type Link {
# url: String!
# title: String
# }
type VideoLink {
url: String
}
type Image {

View File

@@ -2,6 +2,6 @@ extend type Query {
materiau(id: Int!): Materiau
}
extend type Mutation {
createMateriau(data: MateriauInput): MateriauResponse
extend type Query {
article(id: Int!): Article
}