Giter VIP home page Giter VIP logo

Comments (12)

vincenzopalazzo avatar vincenzopalazzo commented on June 9, 2024

I did not check the code but do you try to use the correct ws protocol? Check the ws link dart docs about the protocol name

from graphql-flutter.

rrifafauzikomara avatar rrifafauzikomara commented on June 9, 2024

I copy the ws link from console log (IDE) when I running that code, then paste it to Postman, it's success connected. Then I send the Message by clicked Send button, it's success get the data as well.

Seems the problem is I need to send the Message as well like in the Postman, but not sure how to do it on ur pacakge, any suggestion?

For the ws protocol, yea i use the correct one, which is 'Sec-WebSocket-Protocol': GraphQLProtocol.graphqlWs, same like in the Postman, which is Sec-WebSocket-Protocol:graphql-ws

from graphql-flutter.

vincenzopalazzo avatar vincenzopalazzo commented on June 9, 2024

I am not able to see what is the ws server protocol, can you post it?

In addition, I am having a hard time with the postman image because I do not use it, so with postman you are able to get the result in the correct way? If yes we need a reproducer for this

from graphql-flutter.

rrifafauzikomara avatar rrifafauzikomara commented on June 9, 2024

how i can get/see the ws server protocol? I do not understand what u mean, basically, I just follow ur example from here: https://github.com/zino-hofmann/graphql-flutter/tree/main/examples/starwars

but adding some extra code like header, token, etc. I already share all my code above.

Yea from the postman I can get the data because I can send the Message by clicked the Send button, but how to do it in ur package?

from graphql-flutter.

vincenzopalazzo avatar vincenzopalazzo commented on June 9, 2024

The demo is not working, so you should follow this #1204 I should merge it, too also, if needs some work.

In addition, you should know what protocol the server speaks, I can not know. Try to change the protocol to the last one and see what happens

Yea from the postman I can get the data because I can send the Message by clicked the Send button, but how to do it in ur package?

Sorry I do not know what Send a message means!

from graphql-flutter.

rrifafauzikomara avatar rrifafauzikomara commented on June 9, 2024

in my example code above, I already share the ws protocol, which is graphql-ws.

Screenshot 2023-07-20 at 7 07 00 PM

Sorry I do not know what Send a message means!

How can u understand it if u never see my Postman image, lol.

Here's the image, pls see the red line!
aaa

from graphql-flutter.

vincenzopalazzo avatar vincenzopalazzo commented on June 9, 2024

No please no screenshot, try to change the protocol with the second one and see the server has the new protocol enabled

from graphql-flutter.

rrifafauzikomara avatar rrifafauzikomara commented on June 9, 2024

So you hope to understand other developer's problems that use ur package without wanting to see the problem? lol

Change protocol to what? in postman, we use that on the header. In my example code above, I use it as well. And for the ws link we use the same for both flutter code and also postman.

ws link: wss://BASEURL/graphql/realtime?header=<EncodedHeader>&payload=e30=
ws protocol: graphql-ws

from graphql-flutter.

vincenzopalazzo avatar vincenzopalazzo commented on June 9, 2024

So you hope to understand other developer's problems that use ur package without wanting to see the problem? lol

You are asking to me to spend time on your problem without know what ws protocol your server speak, by putting a couple of picture together and without know that the library support another protocol (and this mean that you never see the docs)

static const String graphqlTransportWs = "graphql-transport-ws";

every time I regret spending some time on an issue without reproducer. So if you want me to see the problem you need to reproduce an issue with an example that I can run.

P.S: It is missing also the library version, so this is not a bug report, but a consultancy request it you want it you should consider using the email.

Cheers

from graphql-flutter.

rrifafauzikomara avatar rrifafauzikomara commented on June 9, 2024

Sorry about that, prev I don't understand what ws meant, but if u see my code and also I already share it with u right, the ws protocol u mean was graphql-ws or GraphQLProtocol.graphqlWs.

by putting a couple of picture together

Like I said before right, the subscription working on Postman, then I want to explain it to u so I put a couple of pictures together with some description about that pictures, but u say Sorry I do not know what Send a message means! :(. Then how I can explaint the Postman and my case to u? coz the Message and Send what I mean before is only available on the screenshot :(.

But yeah nvm, thanks for spending ur time to take a look on my issue. The problem before it's not because ws protocol i think, but because I don't add connectFn in the WebSocketLink. After I add this, now I can get the data from subs. But seems got another error from that.

flutter: Rifa 3: {"type":"connection_ack","payload":{"connectionTimeoutMs":300000}}
flutter: Rifa 3: {"type":"ka"}
flutter: Rifa 3: {"type":"error","payload":{"errors":[{"errorType":"UnsupportedOperation","message":"unknown not supported through the realtime channel"}]}}

Is this error coming from my server or from the package (need more setup)?

from graphql-flutter.

vincenzopalazzo avatar vincenzopalazzo commented on June 9, 2024

Just checking the error on stack overflow https://stackoverflow.com/questions/74293606/websocket-with-appsync-error-unsupportedoperation-unknown-not-supported-throug

It is the server, please see the PR that are open to check how to do authentication

from graphql-flutter.

vincenzopalazzo avatar vincenzopalazzo commented on June 9, 2024

I am closing this because you solved the problem by looking at your code. feel free to if you had a reproducer

from graphql-flutter.

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.