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

DateScalarType, DateTimeScalarType.php and JsonScalarType.php mistake? #3

Open
fvromera opened this issue Oct 27, 2017 · 0 comments
Open

Comments

@fvromera
Copy link

fvromera commented Oct 27, 2017

Hi,

I recently installed your phalcon-graphql-boilterplate to test Phalcon and GraphQL worlds, because them looks very powerful and the best options in their sectors.

Testing your project, when I try to introduce date/datetime fields I have a problem, I get all the time errors like: "date is expected, '2017-10-27' found', but this format is correct.

So, when I verify this format in their classes and found it on redound/phalcon-graphql project, inside the folder src/PhalconGraphQL/Definition/ScalarTypes/, maybe I'm wrong, but when I modified these files it works (because not found StringValue y IntValue in GraphQL\Language\AST):

  1. Changes in JsonScalarType.php

remove: use GraphQL\Language\AST\StringValue;
add: use GraphQL\Language\AST\StringValueNode;

remove: if ($ast instanceof StringValue) {
add: if ($ast instanceof StringValueNode) {

  1. Changes in DateTimeScalarType.php

remove: use GraphQL\Language\AST\IntValue;
add: use GraphQL\Language\AST\IntValueNode;
remove: use GraphQL\Language\AST\StringValue;
add: use GraphQL\Language\AST\StringValueNode;

  1. Changes in DateScalarType.php

remove: use GraphQL\Language\AST\IntValue;
add: use GraphQL\Language\AST\IntValueNode;
remove: use GraphQL\Language\AST\StringValue;
add: use GraphQL\Language\AST\StringValueNode;

remove: if ($ast instanceof StringValue || $ast instanceof IntValue) {
add: if ($ast instanceof StringValueNode || $ast instanceof IntValueNode) {

I hope this help a little bit your project :)

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

No branches or pull requests

1 participant