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

Fragment on Query still not working #174

Open
ima9dan opened this issue Dec 13, 2021 · 0 comments
Open

Fragment on Query still not working #174

ima9dan opened this issue Dec 13, 2021 · 0 comments

Comments

@ima9dan
Copy link

ima9dan commented Dec 13, 2021

When having something like:

query{
  ...countrysightings
}

fragment countrysightings on Query{
  topCountrySightings{
    country
    numOccurrences
    state
  }
}

Intended outcome:
We should get the same result as if we called

{
  "data": {
    "topCountrySightings": [
      {
        "country": "us",
        "numOccurrences": 8021,
        "state": ""
      },
      {
        "country": "",
        "numOccurrences": 860,
        "state": ""
      },
      {
        "country": "ca",
        "numOccurrences": 293,
        "state": ""
      },
      {
        "country": "gb",
        "numOccurrences": 69,
        "state": ""
      },
      {
        "country": "au",
        "numOccurrences": 46,
        "state": ""
      },
      {
        "country": "de",
        "numOccurrences": 9,
        "state": ""
      }
    ]
  }
}

Actual outcome:
An internal server error occurs.
The above mentioned query also works in Playground so it should not be a GraphQL syntax issue.

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

1 participant