You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
The text was updated successfully, but these errors were encountered:
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;
The text was updated successfully, but these errors were encountered: