question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to disable the REST API and keep only GraphQL ?

See original GitHub issue

Hi,

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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
CocoJrcommented, Apr 15, 2019

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.

2reactions
soyukacommented, Apr 15, 2019

You’d have to use itemOperations={}, collectionOperations={} to not declare REST operations. The easiest would be to add a new implementation of ResourceMetadataFactoryInterface that declares that on every operation. For now I don’t see an easy way to do this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found