Replies: 4 comments
-
Can you post your setup code? |
Beta Was this translation helpful? Give feedback.
-
Yes and thank you for your prompt reply... The subscription in question is to publish all domain events that were generated via a command. This is done within the MediatR behaviour pipeline post db commit ....
Here is the aggregate mutation resolver, service-side (Note: this works great in SS Demo client) ...
Here is the aggregate Query type (Note: this works great in SS Demo client) ...
Here is the domain service subscription, which publishes any domain event generated by the service (Note: this does not surface within SS Demo client) ...
Here is the GraphQL configuration...
Here is the Blazor Demo app program.cs
Here is the graphqlr.json ....
Here is the AllDailyFloatSheets.graphql query ...
Here is the CreateDailyFloatSheet.graphql mutation ...
Here is the OnDomainEvent.graphql subscription ...
Here is the Blazor test page OnInitialized method ....
Client project ... Service is based upon this domain model... Once again, all but the subscription show up on the SS DemoClient and as mentioned, we are able to trigger this subscription within GraphQL Playground, so we kind of feel we've done all that we should have, please advise otherwise. Please let me know if you require additional information. |
Beta Was this translation helpful? Give feedback.
-
In our testing we had the Blazor project within the same as the GraphQL service. The reason it was not generating was that you need to have the domain service running while you build the Blazor project, and this was locking files (we think). We moved the Blazor project to a stand-alone project and we were able to generate the subscription handler within the SS client. Now we have the handler to invoke, however, unfortunately this is not yet getting triggered, it is in GraphQL Playground but not in the Blazor client. |
Beta Was this translation helpful? Give feedback.
-
The issue was related to the using a non secured web socket (Chrome) In the Blazor app, we changed from .... To ... ... and now we are properly receiving responses for any domain event created on the server and published through the event dispatcher. That said however, when we try to run this via a Gateway, the WebSocket connection immediately terminates with the following; "You must declare a subscribe resolver for subscription fields". Is there documentation that describes how to declare a subscribe resolver for a downstream subscription? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We have easily generated both Query and Mutations within a Strawberry Shake client however no matter how much we have tried we can't seem to achieve the same with Subscriptions.
We created the server-side subscription and tested it using GraphQL playground. It works great!
When we attempt to include this subscription within our Blazor test app we can't seem to get the client CLI to add it to our client and thus can't utilize it from within our WASM Blazor apps.
The following subscription works within GraphQL Play Ground IDE...
However, when we add this graphql script (below) in a graphql file within our Blazor app, we can't seem to get the Strawberry Shake generation to pull it in.
Are subscriptions not supported in Blazor WASM applications?
Beta Was this translation helpful? Give feedback.
All reactions