-
Notifications
You must be signed in to change notification settings - Fork 35
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: implement temporary schema definition to support datetime scalars #54
fix: implement temporary schema definition to support datetime scalars #54
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.
Thanks for your PR!
Looks good to me overall, just a few comments.
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 for the changes!
@morozj01 could you update the scalar description to use the one from graphql-scalars so it matches the existing test snapshots please? |
For sure - just updated |
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!
Ensure DateTime scalar inputs are converted to string - #53
Description
This is meant to be a temporary solution to enable datetime scalar types in Ceramic models while this pull request is in review (as there has been no activity for some time.)
This change introduces a custom datetime scalar definition in a new file which is meant to be deleted after the solution is merged into the graphql-scalars package
This schema definition is essentially a simplified copy of the logic defined in the graphql-scalars package.
It purposely kept minimal and therefore only ISO strings in UTC time are supported - as per the documentation
Passing in Unix timestamp or JS date object will throw an error.
How Has This Been Tested?
Describe the tests that you ran to verify your changes. Provide instructions for reproduction.
Currently creating documents with a datetime scalar field will throw this error
With this change, I was able to upload datetime scalar values without issue
IDs:
Model: kjzl6hvfrbw6c65z7bpyak6mgz9maadbucil8sey0lkuy9ebiinbjl0vd9ygal4
Let me know if/what additional testing is needed
Definition of Done
Before submitting this PR, please make sure: