Skip to content

Instantly share code, notes, and snippets.

@freiksenet
Last active April 6, 2018 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freiksenet/e239464b56203ab79f5e5b5aa50de648 to your computer and use it in GitHub Desktop.
Save freiksenet/e239464b56203ab79f5e5b5aa50de648 to your computer and use it in GitHub Desktop.
import { delegateToSchema } from 'graphql-tools';
const resolvers = {
Blog: {
user(parent, args, context, info) {
return delegateToSchema({
schema: userSchema,
operation: 'query',
fieldName: 'userById',
arges: { id: parent.userId },
context,
info,
});
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment