change sth
This commit is contained in:
parent
ba7180e296
commit
cdc6ed5af8
@ -74,6 +74,11 @@ export class ApiServer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private initGraphql() {
|
private initGraphql() {
|
||||||
|
this.server.addHook('onRequest', (request, reply, done) => {
|
||||||
|
// Some code
|
||||||
|
console.log(request)
|
||||||
|
done()
|
||||||
|
})
|
||||||
this.server.register(mercurius, {
|
this.server.register(mercurius, {
|
||||||
schema,
|
schema,
|
||||||
graphiql: true,
|
graphiql: true,
|
||||||
|
@ -21,9 +21,9 @@ const RootQuery = new GraphQLObjectType({
|
|||||||
fields: {
|
fields: {
|
||||||
nft: {
|
nft: {
|
||||||
type: nftType,
|
type: nftType,
|
||||||
args: { address: { type: GraphQLID }, contract: { type: GraphQLString } },
|
args: { address: { type: GraphQLString }, contract: { type: GraphQLString } },
|
||||||
async resolve(parent, args) {
|
async resolve(parent, args) {
|
||||||
return getFirstToken(args.address, args.contract)
|
return await getFirstToken(args.address, args.contract)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
nfts: {
|
nfts: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user