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

Validation attributes #901

Merged
merged 6 commits into from
May 21, 2022
Merged

Validation attributes #901

merged 6 commits into from
May 21, 2022

Conversation

jacobdekeizer
Copy link
Contributor

@jacobdekeizer jacobdekeizer commented Feb 22, 2022

Summary

Thanks for making this package. I wanted to add custom attributes to the Laravel validator so I can translate the attribute names for the mutation arguments, but this is currently not possible. This pull request will add the custom attributes to the Laravel validator in the GraphQL Field class.

Laravel documentation: https://laravel.com/docs/9.x/validation#customizing-the-validation-attributes

Don't know if you consider adding a new public method as a breaking change or not. Let me know if you have any questions!


Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Misc. change (internal, infrastructure, maintenance, etc.)

Checklist:

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

@mfn mfn self-assigned this May 3, 2022
Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

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

LGTM, very nice first PR!

Can you please rebase against master? Couple of months passed and it would be great to ensure everything is working as expected.

Thanks!

@jacobdekeizer
Copy link
Contributor Author

@mfn I've rebased the branch against master.

@mfn
Copy link
Collaborator

mfn commented May 16, 2022

@jacobdekeizer thanks! there are a couple of phpstan errors reported, can you check them?

Note: you need to run phpstan with PHP 8.1 (I do this with the included Makefile/Docker stuff). Ping if you've troubles with that.

@jacobdekeizer
Copy link
Contributor Author

@mfn I've fixed the phpstan errors caused by my changes.

@mfn
Copy link
Collaborator

mfn commented May 21, 2022

Thank you!

@mfn mfn merged commit 1e99051 into rebing:master May 21, 2022
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

Successfully merging this pull request may close these issues.

2 participants