Skip to content

@accounts/graphql-api mmigration. #1267

Answered by darkbasic
danyhiol asked this question in Q&A
Discussion options

You must be logged in to vote

I am using the following from accountsGraphQL:
accountsGraphQL.context, accountsGraphQL.typeDefs, accountsGraphQL.resolvers

app (meaning createApplication's return value) provides both typeDefs and resolvers:

const { typeDefs, resolvers } = app;

Depending on the graphql server of your choice you might be able to use them directly or not. For example with graphql-http (examples/graphql-server-typescript-basic):

import { createHandler } from 'graphql-http/lib/use/http';

const app = createApplication([...]);
const { injector, createOperationController } = app;
// Create the GraphQL over HTTP Node request handler
const handler = createHandler<Pick<IContext, keyof IContext>>({
  schema: app.s…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@danyhiol
Comment options

@darkbasic
Comment options

@danyhiol
Comment options

Answer selected by darkbasic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants