Skip to content

Extract Object types #233

Answered by kitten
carlocorradini asked this question in Q&A
Apr 19, 2024 · 3 comments · 5 replies
Discussion options

You must be logged in to vote

There is a dedicated helper to extract input, scalar, and enum types, as per: https://gql-tada.0no.co/reference/gql-tada-api#graphql-scalar

As per other discussions and issues, you by definition can't extract object types.
Object types don't have a fixed type, since their type is dependent on a selection. Instead, you'd always create a specific fragment of what data a piece of code depends on and then compose these fragments upwards — details here: https://gql-tada.0no.co/guides/fragment-colocation

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by carlocorradini
Comment options

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

Comment options

You must be logged in to vote
4 replies
@kitten
Comment options

@kyrylofranko
Comment options

@kitten
Comment options

@kyrylofranko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants