Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use graphql-shield with graphql and express-graphql #94

Closed
nmquaan opened this issue Jul 10, 2018 · 3 comments
Closed

Use graphql-shield with graphql and express-graphql #94

nmquaan opened this issue Jul 10, 2018 · 3 comments

Comments

@nmquaan
Copy link

nmquaan commented Jul 10, 2018

Hi everyone,
I'm doing a project that uses graphql but I use graphql with express-graphql. But I want to apply graphql-shield to my project.
Please help me!
Thanks for the support!
import { GraphQLSchema, GraphQLObjectType, } from 'graphql';
import { user, users, usersByRole } from './queries/UserQueries';
const queryType = new GraphQLObjectType({ name: 'QueryType', description: 'The root for all queries available.', fields: { users, user, usersByRole, } });
// Creating schema
const schema = new GraphQLSchema({ query: queryType, });
export const permission = shield({ Query: queryType, });
export default schema;

@maticzav
Copy link
Owner

Hey @nmquaan 👋 I think this is a duplicate of #53 in a way, tell me if that solved your problem. 😄

@nmquaan
Copy link
Author

nmquaan commented Jul 10, 2018

Hi @maticzav,
Thanks for the support! I will check it and tell you If I solved my problem.

@nmquaan
Copy link
Author

nmquaan commented Jul 13, 2018

Thanks for the support @maticzav
I solved my problem.
I will close this issue.

@nmquaan nmquaan closed this as completed Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants