Skip to content

Honor REST and GraphQL enable flag #1264

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

Merged

Conversation

abhishekkumams
Copy link
Contributor

@abhishekkumams abhishekkumams commented Feb 24, 2023

Why make this change?

What is this change?

  • Adding a check to see if rest/graphQL is disabled, then not mapping the endpoints to the app.
  • We discard the requests by throwing the 404 not found error.

How was this tested?

  • Integration Tests - Tested for both Hosted and Non-Hosted Scenario

Sample Request(s)

runtime config:

"runtime": {
    "rest": {
      "enabled": false,
      "path": "/api"
    },
    "graphql": {
      "allow-introspection": true,
      "enabled": false,
      "path": "/graphql"
    }
  }

Both Rest and GraphQL disabled globally

REST

image

GraphQL

image

Rest is Enabled, GraphQL disabled

REST

image

GraphQL

image

REST is disabled, GraphQL enabled

REST

image

GraphQL

image

Both REST andGraphQL enabled

REST

image

GraphQL

image

When globally both rest and GraphQL is enabled, but entity option has it disabled.

config

image

REST

image

GraphQL

image

@abhishekkumams abhishekkumams merged commit 4ddab3f into main Feb 27, 2023
@abhishekkumams abhishekkumams deleted the dev/abhishekkuma/honor_global_rest_and_graphql_flag branch February 27, 2023 17:39
@abhishekkumams abhishekkumams self-assigned this Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rest and GraphQL enable field is not honored by the runtime engine
4 participants