Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop when wrong variables are used in addSmartSubscription #1375

Open
ChuckBorris33 opened this issue Jun 21, 2022 · 0 comments
Open

Comments

@ChuckBorris33
Copy link

Describe the bug
Infinite loop when wrong variables are used in addSmartSubscription.
WS messages in network tab:

↑ {
   "id":"530",
   "type":"start",
   "payload":{
      "variables":{
         "traceToken":"7476730793994548bd69d28094eb665f"
      },
      "extensions":{
         
      },
      "operationName":"extNotification",
      "query":"subscription extNotification($traceTokens: [String!]!) ..."
   }
}
↓ {
   "type":"data",
   "id":"530",
   "payload":{
      "data":null,
      "errors":[
         {
            "message":"Variable \"$traceTokens\" of required type \"[String!]!\" was not provided.",
            "locations":[
               {
                  "line":1,
                  "column":33
               }
            ]
         }
      ]
   }
}
↑ {"type": "complete", "id": "530"}
↓ {"id":"530","type":"stop"}

Than it continues with same messages with id 531.

To Reproduce
Steps to reproduce the behavior:

  1. Define smart subscription with addSmartSubscription using invalid variables
  2. See ws traffic in browser network tab.

Expected behavior
When errors are returned while initializing subscription it should not be restarted. Or option should be provided to control when subscription should be retried.

Versions
vue: 2.6.14
vue-apollo: 3.1.0
@apollo/client: 3.5.8

Additional context
channels_graphql_ws.graphql_ws_consumer is used in backend
Probably related to fix for #877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant