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

Consider dropping GraphQL via GET for Mutations #2574

Closed
michaelstaib opened this issue Nov 13, 2020 · 1 comment · Fixed by #2583
Closed

Consider dropping GraphQL via GET for Mutations #2574

michaelstaib opened this issue Nov 13, 2020 · 1 comment · Fixed by #2583
Assignees
Projects
Milestone

Comments

@michaelstaib
Copy link
Member

graphql/graphql-over-http#123

@michaelstaib michaelstaib added this to the HC-11.1.0 milestone Nov 13, 2020
@michaelstaib michaelstaib added this to 11.0.0 in Backlog via automation Nov 13, 2020
@michaelstaib michaelstaib moved this from 11.0.0 to backlog in Backlog Nov 13, 2020
@michaelstaib
Copy link
Member Author

We have reworked the middleware options and defaults.

By default we allow HTTP GET requests but only with query operations.

This can be changed with the following middleware options:

endpoints
    .MapGraphQL()
    .WithOptions(
        new GraphQLServerOptions 
        {
            AllowedGetOperations = AllowedGetOperations.QueryAndMutation
        });

In order to disable HTTP GET requests:

endpoints
    .MapGraphQL()
    .WithOptions(
        new GraphQLServerOptions 
        {
            EnableGetRequest = false
        });

@michaelstaib michaelstaib moved this from backlog to review in Backlog Nov 15, 2020
@michaelstaib michaelstaib self-assigned this Nov 15, 2020
@michaelstaib michaelstaib linked a pull request Nov 15, 2020 that will close this issue
@michaelstaib michaelstaib moved this from review to ready for next preview in Backlog Nov 16, 2020
@michaelstaib michaelstaib moved this from ready for next preview to current preview in Backlog Nov 17, 2020
@michaelstaib michaelstaib moved this from current preview to Done in Backlog Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Backlog
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant