Stranger6667 / hypothesis-graphql

Generate arbitrary queries matching your GraphQL schema, and use them to verify your backend implementation.
https://pypi.org/project/hypothesis-graphql/
MIT License
44 stars 2 forks source link

[BUG] Invalid queries when arguments have required fields #46

Closed Stranger6667 closed 3 years ago

Stranger6667 commented 3 years ago

Describe the bug If arguments in the input query type contain required fields, they should be present in generated queries. Otherwise, such a query is invalid.

Example:

input RequiredInput {
  eq: Float!,
}

type Query { 
  getData(query: RequiredInput): Float! 
}

Generated query:

{
  getData(query: {})
}

Error: Field 'RequiredInput.eq' of required type 'Float!' was not provided.