Giter Club home page Giter Club logo

Comments (6)

rose-a avatar rose-a commented on September 26, 2024

Your server says Sub protocol not supported! You should check which websocket transport protocol you server supports and configure your client accordingly.

from graphql-client.

mehdi-blanchard avatar mehdi-blanchard commented on September 26, 2024

The AppSync developer guide specify that the protocol is "graphql-ws", which is the default for GraphQLHttpClientOptions.WebSocketProtocol

With these requirements, a WebSocket client can connect to the URL, which contains the real-time endpoint with the query string, using graphql-ws as the WebSocket protocol.

I have no idea what the sub protocol is. Is it different?

from graphql-client.

rose-a avatar rose-a commented on September 26, 2024

The client tries to auto-negotiate, which AppSync does not seem to support...

You can specify the used protocol by setting GraphQLHttpClientOptions.WebSocketProtocol to WebSocketProtocols.GRAPHQL_WS

from graphql-client.

mehdi-blanchard avatar mehdi-blanchard commented on September 26, 2024

I've added the line
options.WebSocketProtocol = WebSocketProtocols.GRAPHQL_WS;
and now GraphQLHttpClient.InitializeWebsocketConnection() is successfull which is great.

UnfortunateIy I am now getting a new error "You are not authorized to make this call" when I call Subscribe(...)

image

from graphql-client.

rose-a avatar rose-a commented on September 26, 2024

Well... seems you're not authorized πŸ˜‰

I'm not that familiar with the AppSync API, but I'm sure there is documentation about how to authorize against it.

from graphql-client.

mehdi-blanchard avatar mehdi-blanchard commented on September 26, 2024

@rose-a Success !!

I found this other AppSync entry and it helped solving the issue.

Thanks a lot for your help!

from graphql-client.

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.