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

Allow serialising already-blessed bools #30

Merged
merged 2 commits into from Nov 9, 2020
Merged

Allow serialising already-blessed bools #30

merged 2 commits into from Nov 9, 2020

Conversation

ccakes
Copy link
Contributor

@ccakes ccakes commented Nov 9, 2020

serialize => _leave_undef(sub { !is_Bool($_[0]) and die "Not a Boolean.\n"; $_[0] ? JSON->true : JSON->false }),

I'm trying to wire up a method to a GraphQL field that returns already-blessed JSON::PP::Boolean instances which was tripping up ☝️ this check.

This PR just allows serialising objects that pass the JSON::is_bool test

@coveralls
Copy link

coveralls commented Nov 9, 2020

Pull Request Test Coverage Report for Build 400

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.986%

Totals Coverage Status
Change from base Build 397: 0.0%
Covered Lines: 1181
Relevant Lines: 1298

💛 - Coveralls

@mohawk2 mohawk2 merged commit 42efbc9 into graphql-perl:master Nov 9, 2020
@mohawk2
Copy link
Collaborator

mohawk2 commented Nov 9, 2020

Great work, thanks!

mohawk2 pushed a commit that referenced this pull request Nov 9, 2020
@mohawk2
Copy link
Collaborator

mohawk2 commented Nov 9, 2020

Released as 0.44.

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.

None yet

3 participants