GraphQL Playgroud

The Afosto Storefront GraphQL Playground is a powerful tool that offers an interactive environment to test your GraphQL queries and mutations. It is located at https://afosto.app/graphql and has been developed using Apollo's GraphQL Playground, which provides a user-friendly interface and comprehensive functionality.

GraphQL Playground interface with example query and data

Accessing GraphQL Documentation

One of the key features of the playground is its in-built documentation. Here, you can browse details about available GraphQL queries and mutations. You'll find clear explanations about the syntax, types, and fields you can use, enabling you to understand the full capabilities of the GraphQL API provided by the Afosto Storefront.

Connecting to Your Afosto Account

To test the queries and mutations with your own data, you can connect the playground to your Afosto account.

To do this, click on the button located at the top right of the screen. A new window will appear allowing you to select a different contract that you're connected to. In this window, you'll also see details about the data you're granting the playground access to.

Authorizing Access and Executing Queries

Upon granting access, an authorization token is generated, enabling the playground to access your data. You can then write and execute queries or mutations against your data within the playground, making it an incredibly useful tool for testing and development.

It's important to note that any changes made within the playground directly affect your data. Hence, be careful when executing mutations, especially those that modify or delete data.

The Afosto Storefront GraphQL Playground is a valuable resource for developers, whether you're troubleshooting, testing new queries, or exploring the capabilities of the GraphQL API. Its integration with the Afosto account makes it an even more potent tool, allowing you to see real-time results from queries and mutations using your actual data.