Hi,
Sorry, I posted this earlier to the wrong channel, hopefully here is a bit better.
Given the following code-first ObjectType:
import { BigIntResolver } from "graphql-scalars";
@ObjectType()
export class Asset {
@Field(() => BigIntResolver, {
nullable: false,
})
id!: bigint;
}
and the following in my app.module.ts file:
@Module({
imports: [
AssetModule,
GraphQLModule.forRoot<ApolloDriverConfig>({
path: "/",
driver: ApolloDriver,
autoSchemaFile: true,
resolvers: { // <-- specifically here
bigint: BigIntResolver,
},
introspection: true,
debug: true,
}),
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
I get the following error: Error: Cannot determine a GraphQL output type for the "id". Make sure your class is decorated with an appropriate decorator.
What am I missing to ensure this works? This is the approach as laid out in the docs but I feel its missing an important detail to get this to work that I can't figure out myself.
Thank you!