Mercurius federation subscriptions test
Gateway 'api-gateway' and federated service 'auth' is based on fastify-gql (mercurius). Federated schema is builded using build-federated-schema script example. Type-graphql is used for typescript schema and resolvers.
To run:
git clone
docker-compose up -d
yarn install && yarn build && yarn start
To test the subscriptions in gateway:
-
go
http://localhost:8090/playground
-
init subscription:
subscription { simpleSubscription { id message date } }
-
init mutation:
mutation { simpleMutation(message:"1") }
After subscription is closed you can do mutation again, the resolver is still receiving a message from pubsub.