-
-
Notifications
You must be signed in to change notification settings - Fork 510
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
Operation directives (seemingly) always erroring #3509
Comments
hi @parafoxia I think this is our fault in not documenting it well 😊 I made an example of operation directives: https://play.strawberry.rocks/?gist=30af63743c03d47044fe798240ca0f44 They are used when sending the operation :) What are you trying to do exactly? |
Ah thanks for that! I had no idea that playground existed haha. Basically we're implementing a caching system. We're moving over from a solution on top of Ariadne to one in Strawberry, and caching was done as a directive previously. We have since stumbled across an example in the docs of caching being handled by a custom |
@parafoxia Depending on your desired cache granularity, using |
Cool, I'll have a look into all those possibilities. Thanks both of you for your responses! We're really liking Strawberry so far, can't wait for our whole system to be using it 😄 I'll leave this issue open for now in case there were any follow-ups you wanted to track using it (not sure if the docs feedback is tracked separately), but I'm happy on my end. |
@parafoxia let us know how the migration goes (maybe on discord!) and let us know if there's anything we can help with 😊 |
Describe the Bug
This might be an accidental duplicate of #3125. It may also be me rather than the lib at fault as the documentation on Operation directives is very limited (already left feedback for that in the proper place).
It seems that the inclusion of a directive in...well, anything is enough to throw an error when exporting the schema.
MRE:
Passing the directive to
strawberry.type
forMessage
also triggers it. There's adirectives
argument toSchema
, but it's undocumented. It expectsSequence[Type]
, notably notSequence[StrawberryDirective]
-- is that in some way related to this problem?I'm guessing by the traceback below I'm not supposed be passing a
StrawberryDirective
though todirectives
, but if not, what?Traceback:
System Information
Additional Context
Upvote & Fund
The text was updated successfully, but these errors were encountered: