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

Non-null field can return null in response #72

Closed
svrcekmichal opened this issue Oct 31, 2016 · 3 comments
Closed

Non-null field can return null in response #72

svrcekmichal opened this issue Oct 31, 2016 · 3 comments
Assignees
Milestone

Comments

@svrcekmichal
Copy link

tried on last version

schema:

type Query {
  user: User
} 
type User {
  key: Int!
}

query:

{
  user {
    key 
  }
}

If i user graphql-js:

{
  "data": {
    "user": null
  },
  "errors": [
    {
      "message": "Cannot return null for non-nullable field User.key.",
      "locations": [
        {
          "line": 3,
          "column": 5
        }
      ]
    }
  ]
}

With this package:

{
  "data": {
    "user": {
      "key": null
    }
  }
}

There is no error thrown

@Naoto-Ida
Copy link

I'm really interested in contributing to this lib. I'm going to check it out :)
(Ex. mainly PHP guy who jumped on the JS implementation and am now interested in a PHP implementation...)

@portey
Copy link
Contributor

portey commented Nov 4, 2016

@Naoto-Ida , hi

This lib works, and we use it on production, but(!) there're several bugs in resolving non-nullables and with variables usage. To fix bugs we need to refactor processor a lot and now we're fixing it in branch "processor-refacotor", so I hope very soon we'll make new release with all issues fixed.

@viniychuk viniychuk added this to the v1.4 milestone Nov 9, 2016
@viniychuk viniychuk self-assigned this Nov 9, 2016
@viniychuk
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants