Skip to content

Primitive types should not be used  #1023

@vlagorce

Description

@vlagorce

Issue Description

When a field of type Int!, Boolean!, Float! are declared the codegen use the corresponding primitive type.
While using generated client model if a mandatory integer field is not set the generated mutation will send 0 whereas a validation error should have bean thrown.

Steps to Reproduce

send a mutation query for a input having field with the above mentioned types without filling the values.

Expected Result

Fails with Validation error server side.

Actual Result

Primitive types have a default value. The generated query will have those values when none where provided

Your Environment and Setup

  • graphql-java-codegen version: 5.5.0
  • Build tool: Gradle

============
Primitive types should be removed. The issue might also happen to queries with parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp-wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions