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

Support for attributes using arbitrary Expr #239

Closed
AlbertMarashi opened this issue May 25, 2023 · 1 comment
Closed

Support for attributes using arbitrary Expr #239

AlbertMarashi opened this issue May 25, 2023 · 1 comment

Comments

@AlbertMarashi
Copy link

Description of the feature

Forcing users to wrap the attributes in a string is annoying for ergonomics.

#[graphql(guard = "ScopeGuard::new(\"profile:read:email\")")]

Would like to be able to

#[graphql(guard = ScopeGuard::new("profile:read:email"))]

Adding the ability to darling to be able to support expressions as fields would be a great win for ergonomics

async-graphql issue:
async-graphql/async-graphql#1295

@TedDriggs
Copy link
Owner

Support for this was added in darling 0.20; once async-graphql takes the latest version of darling this will be addressed.

Please see #229 for an ongoing discussion of how crate authors should decide what a quote-wrapped value means for Expr-receiving meta items.

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

2 participants