const createNotebook = mutationWithClientMutationId ({
name: 'CreateNotebook',
inputFields: {
token: {
type: GraphQLString,
},
details: {
type: NotebookDetails,
},
},
outputFields: {
},
async mutateCRNotebook(input, context) {
const data = getJSONFromRelativeURL(input.token);
},
});
const NotebookDetails = new GraphQLObjectType({
name: 'NotebookDetails',
interfaces: [nodeInterface],
fields: () => ({
id: globalIdField('NotebookDetails'),
description: {
type: GraphQLString,
description: '...',
resolve(obj) {
return obj.description;
},
},
language: {
type: GraphQLString,
description: '...',
resolve(obj) {
return obj.language;
},
},
}),
});
api_1 | Error: CreateNotebookInput.details field type must be Input Type but got: NotebookDetails.
Write your answer...
Looking through the GraphQL documentation for custom scalar types (I'm trying to create my own date type) I'm not sure what the difference between parseValue and parseLiteral are. http://graphql.o
Ritesh swamy
General
Asked • Jun 24 2019
Currently I am using Apollo/GraphQL/Node.js/Sequelize to build my backend server, and my server code looked like below, in there I can use req.user to get the current login user Now I have two mod
Snehal Kumar
General
Asked • Jun 24 2019