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

Properly handle null values on arguments #213

Closed
Maximilien-R opened this issue Apr 18, 2019 · 0 comments · Fixed by #214
Closed

Properly handle null values on arguments #213

Maximilien-R opened this issue Apr 18, 2019 · 0 comments · Fixed by #214
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Maximilien-R
Copy link
Member

Passing null values to arguments (or variables) aren't handled properly.

  • Tartiflette version: 0.8.6
  • Python version: 3.7.1
  • Executed in docker: No
  • Is a regression from a previous versions? No

SDL example:

type Query {
  hello(name: String = "Unknown"): String
  bye(name: String! = "Unknown"): String
}

Python:

@Resolver("Query.hello")
async def resolve_query_hello(parent, args, ctx, info):
    return args.get("name")


@Resolver("Query.bye")
async def resolve_query_bye(parent, args, ctx, info):
    return args.get("name")

Query:

query {
  hello(name: null)
} == {
  "data": {
    "hello": "Unknown"
  }
} != {
  "data": {
    "hello": null
  }
}
@Maximilien-R Maximilien-R added the bug Something isn't working label Apr 18, 2019
@Maximilien-R Maximilien-R added this to the road-to-v1 milestone Apr 18, 2019
@Maximilien-R Maximilien-R self-assigned this Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant