We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
this query is not working :
const { data: modules, errors: errorModules } = await client.query({ query: gql` { keystone { adminMeta { lists { key description label singular plural path fields { path } } } } } `,
with error :
ApolloError: GraphQL error: Access denied at new ApolloError (/Users/sidalitemkit/work/web/ysana/kysana-pql/scripts/sanitate/node_modules/apollo-client/bundle.umd.js:92:26) at /Users/sidalitemkit/work/web/ysana/kysana-pql/scripts/sanitate/node_modules/apollo-client/bundle.umd.js:1588:34 at /Users/sidalitemkit/work/web/ysana/kysana-pql/scripts/sanitate/node_modules/apollo-client/bundle.umd.js:2008:15 at Set.forEach () at /Users/sidalitemkit/work/web/ysana/kysana-pql/scripts/sanitate/node_modules/apollo-client/bundle.umd.js:2006:26 at Map.forEach () at QueryManager.broadcastQueries (/Users/sidalitemkit/work/web/ysana/kysana-pql/scripts/sanitate/node_modules/apollo-client/bundle.umd.js:2004:20) at /Users/sidalitemkit/work/web/ysana/kysana-pql/scripts/sanitate/node_modules/apollo-client/bundle.umd.js:2131:19 at Object.next (/Users/sidalitemkit/work/web/ysana/kysana-pql/scripts/sanitate/node_modules/zen-observable/lib/Observable.js:322:23) at notifySubscription (/Users/sidalitemkit/work/web/ysana/kysana-pql/scripts/sanitate/node_modules/zen-observable/lib/Observable.js:135:18) { graphQLErrors: [ { message: 'Access denied', locations: [Array], path: [Array], extensions: [Object], uid: 'ckp6wxt8s0000kkuu3u9nfs2b', name: 'GraphQLError' } ], networkError: null, extraInfo: undefined }
Steps to reproduce the behaviour:
const authLink = setContext(async (_, { headers }) => { return { headers: { ...headers, authorization: `Bearer Fe26.2****** `, }, }; }); const httpLink = createHttpLink({ uri: 'http://localhost:3000/api/graphql', fetch: fetch, }); const client = new ApolloClient({ link: authLink.concat(httpLink), cache: new InMemoryCache(), }); try { console.log('initata'); const { data: modules, errors: errorModules } = await client.query({ query: gql` { keystone { adminMeta { lists { key description label singular plural path fields { path } } } } } `, });
when running on the graphQl Explorer its working :
The text was updated successfully, but these errors were encountered:
but working when i do : isAccessAllowed: (context) => true,
export default auth.withAuth( config({ db: { adapter: 'prisma_postgresql', url: '*********', }, ui: { isAccessAllowed: (context) => true, }, lists, session: withItemData( statelessSessions({ maxAge: sessionMaxAge, secret: sessionSecret, }), { User: 'email' }, ), }), );
i thought that was only for UI ? Why it's not working when using context.sudo ?
Sorry, something went wrong.
ui.isAccessAllowed
Successfully merging a pull request may close this issue.
this query is not working :
with error :
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
when running on the graphQl Explorer its working :
The text was updated successfully, but these errors were encountered: