Front-End Web & Mobile

Announcing new GraphQL API features in Amplify Studio

Today, AWS Amplify is announcing support for GraphQL APIs without Conflict Resolution enabled! With this launch, it’s easier than ever to use custom mutations and queries, without needing to manage the underlying conflict resolution protocol. You can still model your data with the same easy-to-use graphical interface. And, we are also bringing improved GraphQL API testing to Studio through the open-source tool, GraphiQL.

What’s new?

Prior to today’s release, Amplify Studio’s data modeler required your app to have Conflict Resolution enabled. Conflict Resolution is used by DataStore – an on-device storage solution for offline-ready apps. This setting governs how your application handles data conflicts that arise from offline use.

For apps without an offline use case, you can turn off Conflict Resolution to remove the additional logic needed to manage data conflict. On the client side, when Conflict Resolution is turned off, use the Amplify Library’s GraphQL API category instead – this lets you take advantage of additional features, like custom selection sets.

Configuring Conflict Resolution

For GraphQL APIs using Conflict Resolution, it’s now easy to change your application’s Conflict Resolution strategy from within your app’s API settings. Just navigate to Data > GraphQL API settings, change to your preferred strategy, and click Save and Deploy.

One screenshot of the Data tab with the GraphQL API settings link available, an arrow, and another screenshot of the Conflict Resolution settings option

Disabling Conflict Resolution

You can also disable or enable Conflict Resolution for your GraphQL API entirely, all from within the same settings page – your preferences will be applied the next time you Save and Deploy.

IMPORTANT NOTE: Disabling Conflict Resolution is destructive to your data! We recommend only converting applications without existing data.

Testing your GraphQL API

Every GraphQL API needs a quick, reliable way to test queries and mutations of your data. To enable testing, we have added GraphiQL, an open-source interface that allows you to test your GraphQL API and modify your data directly. GraphiQL is enabled automatically for all apps that don’t use Conflict Resolution – just navigate to the Content tab in the Studio console.

Screenshot of the Content tab selected, with the GraphiQL interface visible

What’s next?

We have a lot more planned for the Studio data modeling experience. Next on our roadmap, we will we be expanding support for apps without Conflict Resolution by enabling content management, data-bound Figma-to-code React components, and cloud-connected forms generated with Form Builder!

What will you build with GraphQL and Amplify Studio? Make sure to share your ideas and feedback with us on Twitter, and join the community conversation on Discord!