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

__typename is not returned when queried #57

Open
cwheel opened this issue Aug 6, 2020 · 4 comments
Open

__typename is not returned when queried #57

cwheel opened this issue Aug 6, 2020 · 4 comments

Comments

@cwheel
Copy link

cwheel commented Aug 6, 2020

In a query like the following:

query {
   Hero {
      __typename
   }
}

The expected response would contain a key like:

"__typename": "Hero"

Instead, the __typename key is omitted from the response. I've done a bit of poking around in Juniper, and it seems that the concrete_type_name function is called to determine the value __typename should resolve when queried. Wundergraph appears to define that function here, but to no effect. Any thoughts on what might be happening here? Thanks!

@p-alik
Copy link
Contributor

p-alik commented Aug 6, 2020

Hero expects a primaryKey parameter:

hero

concrete_type_name is unused yet.

@cwheel
Copy link
Author

cwheel commented Aug 6, 2020

Right, that query above was a (poor) example. However, in the example you provided, I'd expect the response to be:

"data": {
   "Hero": {
       "__typename": "Hero"
    }
}

I'm also not quite sure I understand what you mean by being unused. As I understand it, concrete_type_name is something Juniper expects to be implemented.

@p-alik
Copy link
Contributor

p-alik commented Aug 7, 2020

I'm also not quite sure I understand what you mean by being unused. As I understand it, concrete_type_name is something Juniper expects to be implemented.

Please, ignore my silly remark regarding concrete_type_name

@cwheel
Copy link
Author

cwheel commented Aug 12, 2020

Got it, so if Wundergraph is implementing concrete_type_name, shouldn't Juniper be able to resolve __typename?

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