URQL: No exchange has handled operations of kind “subscription”

This error happens when you try to use subscriptions in your URQL app but don’t have a subscription exchange. Fix this by installing subscriptions-transport-ws and adding the subscriptionExchange to your URQL config. This error was discovered when writing the real-time chat app example. If you haven’t already, you should check it out. Let’s look at … Read more

Strawberry: Type Query must define one or more fields

This error occurs when you pass a Strawberry type to strawberry.Schema as the query parameter, but that type doesn’t define any fields. To fix this, define at least one field on the type you passed as the query argument. I came across this error when working on the real-time chat app GraphQL example. Since I … Read more

GraphQL Example: Real-time Chat App Using Subscriptions

The code for this example can be found on GitHub here: https://github.com/jmgraff/strawberry-graphql-chat-app. This project builds off our previous full-stack GraphQL example. If you’re new to GraphQL and haven’t read it yet, you should check it out. What we’re making We’re going to make a real-time chat application using GraphQL subscriptions. GraphQL subscriptions are implemented with … Read more

Full Stack GraphQL Example: FastAPI, Strawberry, and URQL

The source code for this article is available on GitHub: https://github.com/jmgraff/fastapi-strawberry-urql This example will walk you through creating a docker compose based full-stack GraphQL API using FastAPI+Strawberry on the backend, and React+URQL on the frontend. The associated GitHub repo is a template and is designed to be used as a starting point for new GraphQL … Read more