question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest GraphQL breaks validate_query

See original GitHub issue

Version 3.2.0 of dependency graphql-core changes the type of graphql.validation.specified_rules.specified_rules from a FrozenList to a tuple. Ariadne’s validate_query includes the line

        supplemented_rules = specified_rules + list(rules)

which now breaks with the error

TypeError: can only concatenate tuple (not "list") to tuple

Without looking into it too much, I assume just changing the line to

supplemented_rules = list(specified_rules) + list(rules)

would fix the problem without introducing a backward-incompatibility with graphql < 3.2.0.

Here is the commit that changed the type, and it was released in v3.2.0rc4.

It would also be worthwhile to limit the graphql-core version compatibility to pin to a minor release since that package notes that breaking changes can be introduced when the minor version changes.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rafalpcommented, Feb 21, 2022

Fixed on master

0reactions
gdalmaucommented, Feb 22, 2022

For reference purposes, it was fixed in https://github.com/mirumee/ariadne/pull/796

Read more comments on GitHub >

github_iconTop Results From Across the Web

Schema checks - Apollo GraphQL Docs
GraphOS provides schema checks to help you identify breaking changes before you make ... Note: Because breaking changes are detected by analyzing recent...
Read more >
Server should skip validation of queries with include===false ...
Currently, the server validates all parts of a query, even parts that will be dropped due to include being false or skip being...
Read more >
Detect breaking GraphQL schema changes with GitHub Actions
Learn how to configure a GitHub Action to automatically detect breaking schema changes when new Pull Requests are opened.
Read more >
Schema Structure - GraphQL Ruby
Structural changes to a GraphQL schema come in two categories: Breaking changes may cause previously-valid queries to become invalid.
Read more >
GraphQL : Query failed to validate - Stack Overflow
I guess the correct query should be : { getstatus(id:"123") }. with the following reasons : You define the id argument as String...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found