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

Scalar type checks for AST classes #15

Open
3 tasks
stevan opened this issue Sep 16, 2018 · 0 comments
Open
3 tasks

Scalar type checks for AST classes #15

stevan opened this issue Sep 16, 2018 · 0 comments
Labels
missing functionality Functionality that is missing
Milestone

Comments

@stevan
Copy link
Owner

stevan commented Sep 16, 2018

Currently the auto-generated AST classes will type check most arguments correctly, however it does not actually support sensible checks for the Scalar types (String, Boolean, Int, etc). Currently these are only checked to be defined values, but we can do better.

Most of this can be done within the bin/util/generate-ast-classes script.

Here are the locations that deal with scalars (non-blessed/non-ref) in the script:

The way to do this is to write new assertion checkers and put them into the Graph::QL::Util::Assertions module, and then have the script use them. We need to move towards centralizing the type checking logic anyway.

@stevan stevan added missing spec Something in the spec we've not done yet missing functionality Functionality that is missing and removed missing spec Something in the spec we've not done yet labels Sep 16, 2018
@stevan stevan added this to the v0.01 milestone Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing functionality Functionality that is missing
Projects
None yet
Development

No branches or pull requests

1 participant