Guys, how add GraphQLInputObjectType object to schema?!
I think I have to give you some explanations
I need possibility to use in Mutation some arrays of GeoJSON Points.
I have no idea how (-:
Maybe any suggestion?
Now I’m trying to create my custom input type. Without luck (-:
Some my tests:
export const CreateInput = new GraphQLInputObjectType({
name: 'CreateInput',
description: 'Self Descriptive',
fields() {
return {
questionName: {
type: GraphQLString,
},
}
},
})
Added this to my root resolver…
Created in typeDefs:
const CreateInput = `
input CreateInput {
questionName: String
}
`
And now I have error on my server: Error: "name" defined in resolvers, but not in schema
Name?! I don’t have name
in resolvers…
I’m sure, I’m doing something wrong…
@benjamn @sashko guys, maybe you can give me some hints? (-: