fragment
We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
The fragment
keyword lets you define new fragments that can be referenced in a
query, per the
Fragments section of the GraphQL specification.
Fragments allow for the reuse of common repeated selections of fields, reducing
duplicated text in the DQL documents. Fragments can be nested inside fragments,
but no cycles are allowed in such cases. For example:
GraphQL+- has been renamed to Dgraph Query Language (DQL). While
application/dql
is the preferred value for the Content-Type
header, we
will continue to support Content-Type: application/graphql+-
to avoid making
breaking changes.
Was this page helpful?