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

Can't query for fields on a type #23

Closed
steveluscher opened this issue Aug 30, 2015 · 8 comments
Closed

Can't query for fields on a type #23

steveluscher opened this issue Aug 30, 2015 · 8 comments

Comments

@steveluscher
Copy link
Contributor

This query results in type.getFields is not a function.

query ShipTypeQuery {
  __type(name:"Starship") {
    fields
  }
}

Edit: s/Ship/Starship/

@leebyron
Copy link
Contributor

Client side or server side? I haven't been able to repro this yet

@leebyron
Copy link
Contributor

Is "Ship" a type in your schema? I may need to see your machine to repro

@fson
Copy link
Contributor

fson commented Aug 31, 2015

I was able to reproduce this on http://graphql-swapi.parseapp.com/graphiql/

Seems that the combination of nonexistent type "Ship" and missing selection set for fields might trigger it somehow.

@steveluscher
Copy link
Contributor Author

Sorry for all of the derp in this bug report. Let me try again.

  1. Visit http://graphql-swapi.parseapp.com/graphiql/
  2. Type, into the query, allStarships and press ⌘-Enter; fields autocomplete.
  3. Empty out the subfields, type edges, and press ⌘-Enter; type.getFields is not a function error appears.

getfields

@leebyron
Copy link
Contributor

leebyron commented Sep 1, 2015

Thanks for the steps! I'll dig into this.

BTW, what do you use to make screencast gifs?

@wincent
Copy link
Contributor

wincent commented Sep 2, 2015

@leebyron: This is a pretty nice resource. I've used the screengif tool mentioned there with success before.

@steveluscher
Copy link
Contributor Author

I use Licecap.

@leebyron
Copy link
Contributor

leebyron commented Sep 3, 2015

On npm now as v0.1.3

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