GraphQL dynamic query building

GraqhQL provides directives for this very purpose. Create a fragment to define common fields, use @include(if: Boolean) and @skip(if: Boolean) directives on that fragment to get dynamic fields. By dynamic fields we mean fields that are known at execution time. According to spec, it is best to avoid manual string interpolation to construct dynamic queries. … Read more