strawberry icon indicating copy to clipboard operation
strawberry copied to clipboard

Cannot return null for non-nullable field Subscription.count

Open vkholodov opened this issue 5 months ago • 5 comments

I have same issue as in #2756. Can't make work simple subscription example from strawberry docs.

image

System Information

  • Operating system: Ubuntu 18.04.6 LTS
  • Strawberry version (if applicable): 0.217.1
  • Python version 3.11.3

Additional Context

image

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

vkholodov avatar Feb 23 '24 10:02 vkholodov

hi @vkholodov! Is that postman?

patrick91 avatar Feb 23 '24 10:02 patrick91

@patrick91 Yes, it is.

vkholodov avatar Feb 23 '24 10:02 vkholodov

@vkholodov can you try with this guide? https://blog.postman.com/how-to-use-graphql-subscriptions/

the screenshot makes me thing it's doing a POST request and not a WS

(maybe we should do a better error in that case)

patrick91 avatar Feb 23 '24 11:02 patrick91

After your question I tried graphiql web app and it works. Trying to figure out what's wrong with postman request.

vkholodov avatar Feb 23 '24 11:02 vkholodov

Maybe we can work on improving the error message in the web view here. Especially with regard to SSE/Multipart Subscriptions, indicating that a wrong / unsupported method is used will be a valuable addition.

erikwrede avatar Feb 24 '24 17:02 erikwrede