-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Field hashing breaks subscriptions #478
Comments
Is the situation you're describing one where the subscription request lives outside of You can also see an example of a wired up subscription at https://github.com/dillonkearns/elm-graphql/blob/master/examples/subscription/Main.elm. |
@dillonkearns can you please confirm that if we make our own version of
A bit of a background: |
Yeah, I would try returning a hardcoded Nothing there and that should remove hashes. You can run the test suite with that change to confirm. Just keep in mind that you won't be able to get multiple fields with the same name but different arguments. |
Oh i see.. there is no way to parametrize that change the way things are now.. I was hoping to make a version of |
Yeah, I wrote about what the hash design does here: https://medium.com/@dillonkearns/how-elm-guides-towards-simplicity-3d34685dc33c. You could potentially add a string alias to the SelectionSet data type and add a helper to add an alias to a given SelectionSet so you can manually add an alias to some fields. Not sure it would still be worthwhile at that point, but you could explore that direction. |
@NickGeek I believe the newer version solves this problem. Can you verify? |
Hi,
I've spent some time today fighting this and ultimately I'm not sure of a solution. If a subscription is sent off with one argument it cannot be parsed without also knowing the value of the argument.
So if my query is:
I cannot have a general purpose decoder using
Graphql.Document.decoder
without knowing thatbob
will bein the
name
field.This makes a generic subscription port impossible for me to implement if the subscription query is written by
elm-graphql
.The text was updated successfully, but these errors were encountered: