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

Graphql query forbidden if using get for queries #14601

Closed
Olli1080 opened this issue Oct 11, 2022 · 1 comment
Closed

Graphql query forbidden if using get for queries #14601

Olli1080 opened this issue Oct 11, 2022 · 1 comment

Comments

@Olli1080
Copy link

Bug report

Required System information

  • Node.js version: 16.17.1
  • NPM version: 8.15.0
  • Strapi version: 4.4.3
  • Database: postgresql
  • Operating system: Ubuntu 22 lts

Describe the bug

A clear and concise description of what the bug is.

Steps to reproduce the behavior

  1. Enable users-permissions plugin
  2. Enable graphql plugin
  3. Enable useGETForQueries for apollo client
  4. Create content type and enable public access (and populate)
  5. Query your content type without auth-token
  6. 200 response with forbidden error in payload

Expected behavior

Queried content should be inside the payload without errors

Screenshots

If applicable, add screenshots to help explain your problem.

Code snippets

If applicable, add code samples to help explain your problem.

Additional context

The bug appeared first after upgrading from an version from before pull request #13838 which skips auth for GET requests.
This works for the scenario without users-permissions but if it's present fails here:

.

@derrickmehaffy
Copy link
Member

For the moment we don't support using GET as the GraphQL playground is bound to that method in Koa. Please submit a feature request for this instead on https://feedback.strapi.io

In the meantime you will need to use POST methods

@derrickmehaffy derrickmehaffy closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants