Overview
This part of the GraphQL API is currently in Early Availability status. For more information, see GraphQL API policy.
GraphQL is an API query language that provides an efficient, fundamentally different way of interacting with data than REST. Client applications build queries (to retrieve data) and mutations (to add, modify, or delete data) that include only the specific fields they want, and the server returns only that data. GraphQL is strongly typed, based on the type definitions in the GraphQL schema, which defines all of the possible data that clients can access.
For more information about basic GraphQL concepts, see the following topics:
For more information about GraphQL in general, see the GraphQL official documentation.
GraphQL vs REST
The AppDirect GraphQL API reflects a fundamental shift in how developers interact with the AppDirect Platform. As an API developer, there are several key differences between GraphQL and REST that you should be aware of:
- GraphQL uses a single endpoint for all requests, instead of unique endpoints for each request. See Endpoints below.
- All requests use the
POST
method, even if you are simply retrieving data. - Clients can build a single request to retrieve or update multiple data objects, rather than using multiple REST requests.
- Client applications can specify the field data they want returned in an API response. REST responses return entire objects and therefore can often contain superfluous data.
Endpoints
Each AppDirect marketplace has its own GraphQL endpoints: one for production and one for preview. The preview endpoint contains any schema elements that are in Preview status, while the production endpoint contains schema elements that are in Early Availability or General Availability status.
-
Preview endpoint:
https://<marketplaceHost>/api/graphql/preview
-
Production endpoint:
https://<marketplaceHost>/api/graphql
For example:
https://mymarketplace.example.com/api/graphql/preview
Preview release
AppDirect is implementing its GraphQL API in stages, starting with the product management API. See the GraphQL API Changelog for details about what is available in this preview.
Limitations
The AppDirect GraphQL API currently has the following limitations:
- Most of the API is only available in Preview. See Endpoints above.
Reference documentation
The AppDirect GraphQL reference documentation, including interactive examples, is available here:
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!