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

aliased fields are omitted if non-alias field is defined in query #83

Closed
yamitzky opened this issue Apr 9, 2018 · 2 comments
Closed

Comments

@yamitzky
Copy link
Contributor

yamitzky commented Apr 9, 2018

If non-alias field and alias fields are defined in a query, alias fields are unexpectedly omitted.

Here is a starwars example to reproduce.

{
  reviews(episode: EMPIRE) {
    stars
  }
  jediReviews: reviews(episode: JEDI) {
    stars
  }
}

Expected Behaviour

{
  "data": {
    "reviews": [],
    "jediReviews": []
  }
}

Actual Behavior

{
  "data": {
    "reviews": []
  }
}

In addition to that, resolver for field jediReviews is never invoked.

Minimal graphql.schema and models to reproduce

@yamitzky yamitzky changed the title alias fields are omitted if non-alias field is defined in query aliased fields are omitted if non-alias field is defined in query Apr 9, 2018
@vektah vektah closed this as completed in #84 Apr 9, 2018
@grzn
Copy link

grzn commented Sep 21, 2020

#84 does not fix this.
The resolver for the alias is never invoked.

@grzn
Copy link

grzn commented Sep 21, 2020

This issue should be re-opened.

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

2 participants