Query
Overview of queries in Optimizely Graph.
In GraphQL, a query is a request for data from a server. Unlike traditional REST APIs, where you make multiple calls to different endpoints to fetch different data sets, GraphQL lets you request the data you need with a single query. You can specify which fields and relationships to retrieve, making your applications more efficient by reducing the amount of data transferred over the network.
A basic GraphQL query consists of the following three query types:
- Cyclic Queries – Traverses complex relationships within the user data schema. Useful for exploring interconnected data structures.
- Parent and Child Queries – Create a single query to retrieve parent documents and their children's data using joins with linking. Lets you nest queries to fetch related data and use arguments to filter data.
- Recursive Queries – Handles hierarchical data structures effectively. Helps facilitate navigation of nested relationships within your data.
Updated 1 day ago