Open dieg092 opened 8 months ago
Hello, it's my first time implementing nexus in nextjs 14 project. My configuration works fine but one warning is shown when /api/graphql is requested.
This is my configuration. I dont know how to fix it. Some idea?
Warning:
Dependences:
/api/graphql/route.ts:
Schema.ts:
import { arg, enumType, intArg, interfaceType, makeSchema, objectType, queryType, stringArg, list, } from 'nexus' const Node = interfaceType({ name: 'Node', definition(t) { t.id('id', { description: 'GUID for a resource' }) }, resolveType(data) { if (data.hasOwnProperty('username') && data.hasOwnProperty('email')) { return 'Account'; } return null; } }) const Account = objectType({ name: 'Account', definition(t) { t.implements(Node) t.string('username') t.string('email') }, }) const StatusEnum = enumType({ name: 'StatusEnum', members: ['ACTIVE', 'DISABLED'], }) const Query = queryType({ definition(t) { t.field('account', { type: Account, args: { name: stringArg(), status: arg({ type: 'StatusEnum' }), }, }) t.field('accountsById', { type: list(Account), args: { ids: list(intArg()), }, }) }, }) const schema = makeSchema({ types: [Account, Node, Query, StatusEnum], }) export default schema
hi, not really related to your question but it seems this package is not maintained anymore. Just saying in case you didn't know that :smile:
Hello, it's my first time implementing nexus in nextjs 14 project. My configuration works fine but one warning is shown when /api/graphql is requested.
This is my configuration. I dont know how to fix it. Some idea?
Warning:
Dependences:
/api/graphql/route.ts:
Schema.ts: