Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

There is no validation of parameter types #160

Closed
opomuc opened this issue May 30, 2018 · 3 comments
Closed

There is no validation of parameter types #160

opomuc opened this issue May 30, 2018 · 3 comments

Comments

@opomuc
Copy link

opomuc commented May 30, 2018

This query will be successfull:

query service_query_with_skip($uid: Long, $ignore: Boolean) {
  services(uid: $uid) {
    uid
    p1
    p2 @skip(if: $ignore)
  }
}

"variables": { "uid": 1, "ignore": "this_is_not_boolean" }

Response

    "data": {
        "services": [
            {
                "p1": 123,
                "uid": 1
            }
        ]
    },

@Totktonada
Copy link
Member

Note: a variable values type does not checked for a field too (not only for a directive).

@Totktonada
Copy link
Member

Totktonada commented Jun 18, 2018

We need the following checks:

@Totktonada
Copy link
Member

Set prio1, because it blocks #134.

Totktonada added a commit that referenced this issue Jun 26, 2018
Related to #159.
Related to #160.
Totktonada added a commit that referenced this issue Jun 28, 2018
Fixed Int type to be between -2^31 and 2^31-1 instead of -2^32 and
2^32-1.

Forbid implicit fraction part removing from Int immediate value.

Fixed Long type to forbid variable value of 'number' Lua type that
cannot preciselly represent integral value (allow only ones inside -2^53
and 2^53 exclusivelly).

Related to #159.
Related to #160.
Totktonada added a commit that referenced this issue Jun 29, 2018
Fixed Int type to be between -2^31 and 2^31-1 instead of -2^32 and
2^32-1.

Forbid implicit fraction part removing from Int immediate value.

Fixed Long type to forbid variable value of 'number' Lua type that
cannot preciselly represent integral value (allow only ones inside -2^53
and 2^53 exclusivelly).

Related to #159.
Related to #160.
Totktonada added a commit that referenced this issue Jun 29, 2018
Fixed Int type to be between -2^31 and 2^31-1 instead of -2^32 and
2^32-1.

Forbid implicit fraction part removing from Int immediate value.

Fixed Long type to forbid variable value of 'number' Lua type that
cannot preciselly represent integral value (allow only ones inside -2^53
and 2^53 exclusivelly).

Related to #159.
Related to #160.
Totktonada added a commit that referenced this issue Jul 2, 2018
Fixed Int type to be between -2^31 and 2^31-1 instead of -2^32 and
2^32-1.

Forbid implicit fraction part removing from Int immediate value.

Fixed Long type to forbid variable value of 'number' Lua type that
cannot preciselly represent integral value (allow only ones inside -2^53
and 2^53 exclusivelly).

Related to #159.
Related to #160.
Totktonada added a commit that referenced this issue Jul 2, 2018
It would be better to implement this check as compile-time via
rules.requiredArgumentsPresent or a similar rule for
argument/InputObject.

Related to #159.
Related to #160.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants