Skip to content

How to pass relay Id to where filter of a node? #4831

Answered by sshquack
sshquack asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you @PascalSenn and @tobias-tengler This is now resolved.

Filter input types needs to be explicitly mentioned.

Using code first:

            .AddQueryType()
            .AddType(new FilterInputType<Track>(x =>
                x.Field(y => y.Id).Type<IdOperationFilterInputType>()))

or Using annotation first:

public class Track {
    [ID]
    public int Id { get; set; }
...
...
}

See docs at https://chillicream.com/docs/hotchocolate/defining-a-schema/relay/#usage-in-output-types

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sshquack
Comment options

Answer selected by sshquack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant