Skip to content

Allow raw identifier for field arguments #812

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

Merged
merged 4 commits into from
Nov 26, 2020

Conversation

zaksabeast
Copy link
Contributor

Fixes #786.

This pull request allows raw identifiers to be used for field arguments, and updates multi_args_descr_trailing_comma to include a trailing comma.

@tyranron tyranron added k::api Related to API (application interface) enhancement Improvement of existing features or bugfix labels Nov 24, 2020
Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaksabeast thank you!

Would you be so kind to re-check that for GraphQL interfaces and add appropriate tests to integration_tests/juniper_tests/ too?

@zaksabeast
Copy link
Contributor Author

@tyranron Sure thing!

I'd be happy to do the re-check and add integration tests.

Could you please elaborate on the ask to re-check GraphQL interfaces? I'm not super familiar with Juniper and might be misunderstanding the ask, so correct me if I'm wrong, but it looks like arguments can't currently be used with methods of a trait using the graphql_interface proc macro.

Would adding a test to integration_tests/juniper_tests/src/codegen/derive_object_with_raw_idents.rs make sense, or would a new file be preferred?

@tyranron
Copy link
Member

@zaksabeast

it looks like arguments can't currently be used with methods of a trait using the graphql_interface proc macro.

Hmmm, right. I didn't figure it out. So, #[graphql_interface] doesn't have such problem at all.

Would adding a test to integration_tests/juniper_tests/src/codegen/derive_object_with_raw_idents.rs make sense, or would a new file be preferred?

It would be better to add mod raw_arguments to the integration_tests/juniper_tests/src/codegen/impl_object.rs, like fallible does.

Thanks!

@zaksabeast
Copy link
Contributor Author

Perfect, thank you for the help!

Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaksabeast thanks! 🍻

@tyranron tyranron merged commit 4ffd276 into graphql-rust:master Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix k::api Related to API (application interface)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Field argument descriptions don't get applied if using raw identifier in arguments
2 participants