graphql-python / graphql-python/graphql-core-legacy
List types are not correctly validated
- 主要言語
- Python
- スター
- 372
- フォーク
- 175
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Consider the following test case:
```
from graphql.language.parser import parse
from graphql.utils.build_ast_schema import build_ast_schema
from graphql.validation import validate
def test_list_literal_validation():
schema_text = '''
schema {
query: RootSchemaQuery
}
directive @foo(list: [String!]!) on FIELD | INLINE_FRAGMENT
type Bar {
name: String
}
type RootSchemaQuery {
Bar: Bar
}
'''
schema = build_ast_schema(parse(schema_text))
query = '''
query Baz {
Bar {
name @foo(list: "not_a_list")
}
}
'''
query_ast = parse(query)
errors = validate(schema, query_ast)
assert errors
```
Note that the directive `@foo` requires a list argument, but is passed a string argument instead. Despite this problem, this library claims that the GraphQL query validates with no errors, failing the test. I believe this to be a bug.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。