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

Fix #357 - Allow passing integers as arguments to graphql.Time parameters #358

Merged
merged 2 commits into from
Oct 31, 2019
Merged

Conversation

MaxInertia
Copy link
Contributor

@MaxInertia MaxInertia commented Oct 4, 2019

Read this for details: #357

TLDR version: This PR replaces this switch case in time.go

case int:
	t.Time = time.Unix(int64(input), 0)
	return nil

with this

case int32:
	t.Time = time.Unix(int64(input), 0)
	return nil
case int64:
	t.Time = time.Unix(input, 0)
	return nil

so we can pass integers as graphql.Time when the application is compiled for 64-bit architecture.

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
@MaxInertia MaxInertia changed the title Fix #357 Fix #357 - Allow passing integers as arguments to graphql.Time parameters Oct 8, 2019
@MaxInertia MaxInertia changed the title Fix #357 - Allow passing integers as arguments to graphql.Time parameters Fix #357 - Allow passing integers as arguments to graphql.Time parameters Oct 8, 2019
Copy link
Member

@pavelnikolov pavelnikolov left a comment

Choose a reason for hiding this comment

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

Can you, please, add some unit tests?

@pavelnikolov pavelnikolov merged commit 4450565 into graph-gophers:master Oct 31, 2019
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

2 participants