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

GraphQL: Query on Object field type resolve to null #6631

Closed
Moumouls opened this issue Apr 21, 2020 · 0 comments · Fixed by #6709
Closed

GraphQL: Query on Object field type resolve to null #6631

Moumouls opened this issue Apr 21, 2020 · 0 comments · Fixed by #6709
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@Moumouls
Copy link
Member

Moumouls commented Apr 21, 2020

Issue Description

Step to reproduce:

  • Login with a user and custom auth
  • then with master key execute this GraphQL Query
query findUsers {
  users {
    edges {
      node {
        id
        username
        authData
      }
    }
  }
}

Response:

{
  "data": {
    "users": {
      "edges": [
        {
          "node": {
            "id": "X1VzZXI6Q1BJV09nSnAzMQ==",
            "username": "1vNRLdDtk3p69k6y0OE2RKZxT",
            "authData": null
          }
        }
      ]
    }
  }
}

Debug:

  • Keys selected by GraphQL seems ok: objectId,username,authData
  • But rest API return:
[
  {
    objectId: 'CPIWOgJp31',
    username: '1vNRLdDtk3p69k6y0OE2RKZxT',
    createdAt: '2020-04-21T10:58:07.147Z',
    updatedAt: '2020-04-21T10:58:07.373Z',
    ACL: { '*': [Object], CPIWOgJp31: [Object] }
  }
]

When i disable key selection on parse server graphQL, it seems that authData is correctly returned by internal API.

Select on object type seems to be ignored

@Moumouls Moumouls added the type:bug Impaired feature or lacking behavior that is likely assumed label Apr 21, 2020
@Moumouls Moumouls changed the title GraphQL: Query on Users with authData field resolve authData to null GraphQL: Query on Object field type resolve to null Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
1 participant