How to use the apollo-server-koa/dist/koaApollo.graphqlKoa function in apollo-server-koa

To help you get started, we’ve selected a few apollo-server-koa examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eggjs / egg-graphql / app / middleware / graphql.js View on Github external
return graphiqlKoa({
          endpointURL: graphQLRouter,
        })(ctx);
      }
      if (onPreGraphQL) {
        await onPreGraphQL(ctx);
      }
      const serverOptions = Object.assign(
        {},
        apolloServerOptions,
        {
          schema: app.schema,
          context: ctx,
        }
      );
      return graphqlKoa(serverOptions)(ctx);
    }
    await next();
  };
};