Is it possible to disable the REST API and keep only GraphQL ?
See original GitHub issueHi,
I search how to disable the REST API endpoint to keep only the graphql way.
At this time, i have to C/C my configuration between graphql and collectionOperations / itemOperations in my ApiResource annotation.
It’s mostly problematic for the access_control configuration: if i forgot to protect the collectionOperation but not my graphql, in graphql i can’t access, but witht the API i can.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to stop using your GraphQL API as a REST API
Just import the userQuery and bam! User achieved. The problem with this approach is that there is no such thing as the user...
Read more >Is it possible to disable GraphQL API and graphql-explorer
We want to disable the graphql explorer and graphql api since nobody need this ... Since in REST API, “GET /users” query need...
Read more >Disable GraphQL Query and Subscription Root Fields ...
The feature allows you to disable root fields and customize your GraphQL API. You can disable queries, subscriptions, or both of them. It...
Read more >Why and how to disable introspection query for GraphQL APIs
As a reminder, GraphQL is a popular alternative to REST APIs. ... Engineering and Security teams looking to keep APIs compliant and secure....
Read more >Wrapping a REST API in GraphQL
First we'll need a set of schema building tools. npm install --save graphql. Building the GraphQL Schema#. Ultimately we will want ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

And wich one i keep included to have only graphql ?
Maybe we can take profit of this issue to complete the documentation, no?
Thx for the label.
You’d have to use
itemOperations={}, collectionOperations={}to not declare REST operations. The easiest would be to add a new implementation ofResourceMetadataFactoryInterfacethat declares that on every operation. For now I don’t see an easy way to do this.