Open
Description
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?
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
Metadata
Metadata
Assignees
Labels
No labels