-
Hello! I'm trying the HC workshop completed code sample from Github repo. One interesting query where I try to filter sessions without any id, it works as expected. But when I filter with an Id (which is encoded according to the Relay global identifier) it does not match the expected Id type. If I understand this correctly, relay Id's are meant to be opaque and the client is not supposed to decode. In the above example, when I filter like
it throws an error:
because HC says it is expecting an Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@michaelstaib @tobias-tengler I'd appreciate some guidance on this questions. Currently I'm decoding the relay Id on the JS client (which feels wrong). Please let me know if I need to open a bug report for this. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thank you @PascalSenn and @tobias-tengler This is now resolved. Filter input types needs to be explicitly mentioned. Using code first:
or Using annotation first:
See docs at https://chillicream.com/docs/hotchocolate/defining-a-schema/relay/#usage-in-output-types |
Beta Was this translation helpful? Give feedback.
Thank you @PascalSenn and @tobias-tengler This is now resolved.
Filter input types needs to be explicitly mentioned.
Using code first:
or Using annotation first:
See docs at https://chillicream.com/docs/hotchocolate/defining-a-schema/relay/#usage-in-output-types