0

I am using GraphQL.

Right now there is a field in database from user. It is an Object, but can be any Object and have any level.

Is there something like GraphQLObject or GraphQLAny type? Thanks

const SomeType = new GraphQLObjectType({
  name: 'PrintSpec',
  fields: () => ({
    name: { type: GraphQLString },
    count: { type: GraphQLFloat },
    userData: { type: GraphQLWhatType },  // <- here how can I define this type?
  })
});
Hongbo Miao
  • 31,551
  • 46
  • 124
  • 206
  • This question should help you: https://stackoverflow.com/questions/45598812/graphql-blackbox-any-type – Daniel Bank Dec 01 '18 at 02:18
  • additionally, casting: https://stackoverflow.com/questions/11948667/date-casting-in-javascript – interesting-name-here Dec 01 '18 at 02:18
  • that may be GraphQLList and the implimantation is in the link https://stackoverflow.com/questions/38666767/graphql-how-to-implement-a-graphqllist-of-graphqlobjecttypes – LDS Dec 01 '18 at 03:34

0 Answers0