Code Monkey home page Code Monkey logo

Comments (6)

sungam3r avatar sungam3r commented on July 20, 2024 1

Small note - you may remove builder.Services.AddSingleton<ISchema, MotostoreSchema>(services => new MotostoreSchema(new SelfActivatingServiceProvider(services))); and change .AddSchema<MotostoreSchema>() to .AddSelfActivatingSchema<MotostoreSchema>().

from server.

Shane32 avatar Shane32 commented on July 20, 2024

The user interface you're using to issue the GraphQL subscription request should not be making a POST call. WebSocket connections are upgraded GET connections. What are you using to make the GraphQL request? The GraphQL.NET Server project supports 4 different UI libraries, 3 of which support subscriptions -- GraphiQL, Playground, and Altair -- each of which can be used to test subscriptions.

https://github.com/graphql-dotnet/server#ui-configuration

from server.

Shane32 avatar Shane32 commented on July 20, 2024

It is also possible to use Postman to test a GraphQL subscription, but you will need to follow the graphql-ws protocol and manually send the proper commands to initialize the connection and send the request to start a subscription.

from server.

Shane32 avatar Shane32 commented on July 20, 2024

Please note that GraphQL.NET Server does not currently support subscriptions over SSE connections.

from server.

Shane32 avatar Shane32 commented on July 20, 2024

You may also want to review the samples included with the project:

https://github.com/graphql-dotnet/server#samples

Besides the authorization sample, each sample includes and demonstrates proper subscription support.

from server.

yrodriguezle avatar yrodriguezle commented on July 20, 2024

@sungam3r
With your suggestions, and proper implementation of messageStrem its works.
Thanks. I will close this

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.