-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Add support for custom authorization message #578
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, rarely have a seen such a good "1st PR", thanks for covering everything!
I've only some minor feedback and I'm ready to merge afterwards. I would appreciate if you just rebase your first commit.
Thanks!
CHANGELOG.md
Outdated
|
||
|
||
2020-01-19, 4.0.0 | ||
----------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these lines, as the next release date isn't decided yet!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will do. I haven't added this initially, but saw in the PR checklist it was required to amend CHANGELOG.md and wasn't sure what exactly to add. Are you happy to remove the whole entry I've added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, please keep the changelog (it's a "change log", after all 😜) but only remove the lines I covered in github!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mfn Right, should be ok now I think :)
src/Support/Field.php
Outdated
/** | ||
* @return string | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the phpdoc, doesn't "add" anything here, thanks!
tests/Unit/GraphQLQueryTest.php
Outdated
/** | ||
* Test query with authorize. | ||
*/ | ||
public function testQueryAndReturnResultWithAuthorizeMessage(): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function testQueryAndReturnResultWithAuthorizeMessage(): void | |
public function testQueryAndReturnResultWithCustomAuthorizeMessage(): void |
What do you think about this suggestion?
Thanks for the feedback @mfn , I've updated my PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
https://github.com/rebing/graphql-laravel/releases/tag/5.0.0 has been released which includes this! |
Summary
Currently it is not possible to override the authorization message in case the authorization message returns false.
Type of change
Checklist
composer fix-style