hasura / hasura/graphql-engine

Input validation not working in Graphql Federation

Open
#10,015 0 comments 0 reactions 0 assignees View on GitHub
k/bug t/gql-services v2
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: 2.35.1
CLI Version (for CLI related issue): 2.35.1

### Environment

OSS

### What is the current behaviour?

With Graphql Federation enabled, request passed from the graphql gateway with a input which contains fields with [input validation](https://hasura.io/docs/latest/schema/postgres/input-validations/) enabled, Hasura Engine will somehow ignore the validation field and throw "missing argument for xxx at element yyy"

### What is the expected behaviour?

Hasura can performs validation normally with federation enabled

### How to reproduce the issue?

1. enable graphql federation in hasura and setup a graphql gateway
2. enable input validation
3. make a mutation graphql request

### Any possible solutions/workarounds you're aware of?

the only solution for me now is turn off the input validation, replace it by checking in database

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the mutation through a GraphQL gateway with GraphQL Federation and Hasura input validation enabled, using the reported Hasura and CLI version 2.35.1. Trace the federation request path and input-validation handling to identify where validation is bypassed and the missing-argument error is produced; done means validation works normally for the federated mutation.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.