无法在graphql中创建自定义类型(类型“对象”)

时间:2020-07-16 16:27:33

标签: types graphql scalar

当我尝试创建标量类型时,GraphQLObjectType不是构造函数错误

const anobject = new GraphQLObjectType({
  name: "anobject",
  fields: () => ({
    name: {
      type: GraphQLString,
      description: 'The name of the person.',
    },
    _id :{
      type: GraphQLString,
      description: 'The id of the person.',
    }
  })
});

0 个答案:

没有答案