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

Add breaking tests for creating objects with explicit "null" values #71

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@EyMaddis
Contributor

EyMaddis commented Sep 14, 2017

It is currently impossible to create objects and pass a value as null, so I added a breaking test, see graphile/postgraphile#584

createDefaultValue(input: {
    defaultValue: {
      id: 2000
      nullValue: null
    }
  }) {
    defaultValue {
      id
      nullValue // => is "defaultValue!" instead of "null"
    }
  }
@chadfurman

This comment has been minimized.

Show comment
Hide comment
@chadfurman

chadfurman Sep 18, 2017

Would it make sense to have a test case for when it is nullable?

chadfurman commented Sep 18, 2017

Would it make sense to have a test case for when it is nullable?

@EyMaddis

This comment has been minimized.

Show comment
Hide comment
@EyMaddis

EyMaddis Sep 18, 2017

Contributor

@chadfurman can you be more specific? I am not sure what you mean.

Contributor

EyMaddis commented Sep 18, 2017

@chadfurman can you be more specific? I am not sure what you mean.

@chadfurman

This comment has been minimized.

Show comment
Hide comment
@chadfurman

chadfurman Sep 18, 2017

@EyMaddis I misunderstood and thought this PR did something differently, and actually quite opposite, than it does. The case you're testing for is "null" values on a nullable field (which is what my comment was referencing, thus the confusion):

https://github.com/graphile/graphile-build/pull/71/files#diff-c8bb689a58197b1592c6e704ad935d16R225

chadfurman commented Sep 18, 2017

@EyMaddis I misunderstood and thought this PR did something differently, and actually quite opposite, than it does. The case you're testing for is "null" values on a nullable field (which is what my comment was referencing, thus the confusion):

https://github.com/graphile/graphile-build/pull/71/files#diff-c8bb689a58197b1592c6e704ad935d16R225

@benjie

This comment has been minimized.

Show comment
Hide comment
@benjie

benjie Sep 19, 2017

Member

Closing in favour of #74

Member

benjie commented Sep 19, 2017

Closing in favour of #74

@benjie benjie closed this Sep 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment