Order Service API documentation
The Order Service APIs are built on GraphQL, which is an API technology that meets the demanding requirements of today's front-end applications.
http. Hence, it is recommended to access the Order Service documentation in DTK.One of the benefits of GraphQL is that it is inherently self-documenting. This means, you can explore what data is exposed by the Order Service APIs. This includes the field, type, and description and hence provides sufficient API reference documentation.
The GraphQL specification defines a human-readable schema definition language (SDL) to define types and document them. The GraphQL schema is at the center of a GraphQL-based application. With it, you can view the object types and fields that represent the data that is retrieved from an API, as well as passed to the API. In essence, a GraphQL application uses a schema to describe the shape of the available data, defines a hierarchy of types with fields that are populated from the backend system. The schema also specifies the exact queries and mutations that are available for you to run and allows you to know the operations that you can perform. Queries and mutations are the root types that you can use to read and write data from a GraphQL application.
A schema also normalizes the data by structuring various types, remove redundancies, and create relationships between the types. Most of the benefits offered by GraphQL applications are due to the GraphQL schema that enables validation, parsing, and type safety for APIs. In many ways, schemas are like strong typing in programming, in that you can catch errors while your front-end application is being developed, as well as helping deal with runtime errors.
It is often useful to ask GraphQL for information about what queries it supports and available
schema types. GraphQL allows you to do so by using the introspection system. However, for security
reasons, the GraphQL introspection is disabled (the default setting) on an Order Service instance. You must consider enabling the introspection query on your
Order Service development instance to understand the underlying APIs and schema
types. To enable the introspection query, set the enable_graphql_introspection
parameter to true and restart Order Service.
You can use an interactive tool like GraphQL Playground to view the documentation for the Order Service schemas, types, and APIs. To view API documentation and schema from this tool, you must enable GraphQL introspection on Order Service.
- Deploying Order Service with introspection.
- Start GraphQL Playground.
-
Enter your Order Service deployment URL as the URL ENDPOINT. Order Service URLs adheres to the following pattern:
http://<hostname>:8080/<tenantId>/v1/orderservice. -
Click the DOCS tab to view the API documentation, input, and output type details of the Order Service APIs along with their detailed descriptions.
-
Click the SCHEMA tab to view the complete schema of Order Service along with their detailed descriptions.