change sth

This commit is contained in:
CounterFire2023 2023-06-25 15:04:53 +08:00
parent ba7180e296
commit cdc6ed5af8
2 changed files with 7 additions and 2 deletions

View File

@ -74,6 +74,11 @@ export class ApiServer {
}
}
private initGraphql() {
this.server.addHook('onRequest', (request, reply, done) => {
// Some code
console.log(request)
done()
})
this.server.register(mercurius, {
schema,
graphiql: true,

View File

@ -21,9 +21,9 @@ const RootQuery = new GraphQLObjectType({
fields: {
nft: {
type: nftType,
args: { address: { type: GraphQLID }, contract: { type: GraphQLString } },
args: { address: { type: GraphQLString }, contract: { type: GraphQLString } },
async resolve(parent, args) {
return getFirstToken(args.address, args.contract)
return await getFirstToken(args.address, args.contract)
},
},
nfts: {