Apollo-server: Azure Functions context.log function

Created on 8 Jan 2019  路  1Comment  路  Source: apollographql/apollo-server

How can I use context.log function from my resolvers with apollo-server-azure-functions?

Most helpful comment

Found solution.

const server = new ApolloServer({ typeDefs, resolvers, context: ctx => ({ context: ctx.context }) });

and in resolver

(_, __, { context }) => { context.log("Log message!"); }

>All comments

Found solution.

const server = new ApolloServer({ typeDefs, resolvers, context: ctx => ({ context: ctx.context }) });

and in resolver

(_, __, { context }) => { context.log("Log message!"); }

Was this page helpful?
0 / 5 - 0 ratings

Related issues

attdona picture attdona  路  3Comments

espoal picture espoal  路  3Comments

manuelfink picture manuelfink  路  3Comments

nevyn-lookback picture nevyn-lookback  路  3Comments

mathroc picture mathroc  路  3Comments