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

support: introduce opt-in feature for returning partial response (v2) #10618

Open
meetzaveri opened this issue Dec 3, 2024 · 0 comments
Open
Labels
k/enhancement New feature or improve an existing feature

Comments

@meetzaveri
Copy link
Member

Is your proposal related to a problem?

In current scenario (in Hasura v2), if suppose the developer adds a column to DB , adds it to their frontend query but fails to update Hasura column permissions, it will result into "fail hard" error. It wouldn't's show any data and provide error like

For example if you forgot to add address field in column permissions,

{
  "errors": [
    {
      "extensions": {
        "path": "$.selectionSet.user.selectionSet.address",
        "code": "validation-failed"
      },
      "message": "field \"address\" not found in type: 'user'"
    }
  ]
}

Describe the solution you'd like

The feature request is raised here to address that if there was opt-in configuration, where if user toggles it "on", then it would mean it would allow developer to make inform graphql-engine to return partial response , failing soft , where you return data for columns which exists in column permissions but return null as value for column which doesn't exist in column permissions.

For example, the response would look like (if you forgot to add address field in column permissions )

{
  data: {
    id: "123",
    username:"xyz",
    address: null
   }
}
@meetzaveri meetzaveri added the k/enhancement New feature or improve an existing feature label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/enhancement New feature or improve an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant