GraphQL
GraphQL is a powerful data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. Theneo's GraphQL API support allows clients to request exactly what they need and nothing more, making it easier to evolve APIs over time.
Simply import a .graphql spec and let Theneo parse the entire doc.
- Sample GraphQL doc
How we parse and output the GraphQL spec
Theneo's GraphQL API support provides a structured way to define and interact with your data. The schema you see is automatically parsed by Theneo to facilitate clear and efficient data retrieval and manipulation. Here's an in-depth look at the key components of a GraphQL schema and their importance:
Query
Query
- Definition: A Query is a read-only fetch operation to request data from your GraphQL server. It's akin to performing a
GETrequest in a REST API. - Theneo's Parsing: Theneo interprets the
Querytype definitions to allow clients to make requests for specific data. TheweeklyAdventurequery is automatically grouped under theQuerycategory in the API reference documentation, showcasing its available parameters and return type.
Mutation
Mutation
- Definition: Mutations are how you create, update, or delete data. This is similar to
POST,PUT,PATCH, orDELETEin REST. - Theneo's Parsing: Although not explicitly shown in the provided schema, any defined mutations would be parsed and displayed under this section, detailing how clients can modify data.
Subscription
Subscription
- Definition: Subscriptions maintain a steady connection to the server, allowing clients to receive real-time updates.
- Theneo's Parsing: Theneo would parse and categorize any subscriptions in the schema, explaining how clients can establish a persistent connection to listen for specific events.
Objects
Objects
- Definition: GraphQL objects represent a list of named fields, each of which can return a specific type. They can be thought of as the building blocks of your GraphQL API.
- Theneo's Parsing: The schema's objects like
WeeklyAdventure,TheneoHighlights, andHeroHighlightare parsed and displayed with their fields and respective types, indicating the shape of the data that clients can expect to receive.
Scalars
Scalars
- Definition: Scalars are primitive data types (e.g.,
Int,Float,String,Boolean) that resolve to a single scalar object, and they are the leaves of the query. - Theneo's Parsing: Theneo highlights these fundamental types in the schema, showcasing where they are used within object fields to define the type of data they represent.
Directives
Directives
- Definition: Directives provide a way to dynamically alter the execution of a query or mutation.
- Theneo's Parsing: If any directives are used in the schema, Theneo would explain their use cases, such as conditionally including or skipping fields.
Enums
Enums
- Definition: Enums are a special kind of scalar that is restricted to a particular set of allowed values. They validate that any arguments of that type are one of the allowed values.
- Theneo's Parsing: The
Moodenum in the schema is parsed and documented, indicating the fixed set of options that can be used for fields of this type.
Unions
Unions
- Definition: Unions are similar to interfaces but they can't specify any common fields between the types.
- Theneo's Parsing: If there were unions in the schema, Theneo would parse these and illustrate how they can be used to return an object that could be one of several types.
Theneo GraphQL schema parsing feature automatically structures and documents these elements for developers to easily understand and interact with the API. Each component plays a crucial role in defining the capabilities and constraints of the API, ensuring a robust and flexible interface for interacting with data.
Body Parameters
Response
Response Attributes
Show child attributes
What made this section unhelpful for you?
POST
/
1