graphql-python / graphql-core-legacy

GraphQL base implementation for Python (legacy version – see graphql-core for the current one)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support new multiple inheritance syntax

asodeur opened this issue · comments

graphql-js 0.13 introduced a new multiple inheritance syntax, see #1169. relay 1.6 will no longer support the old syntax, see release notes.

Implementing the new and dropping support for the old syntax is straight forward (patch attached) but would be a breaking change. A switch like useLegacySDLImplementsInterfaces sounds like a better idea but I am not sure what would be the best place for that in graphql-python (GraphQLSchema?).
0002-new-multiple-inheritance-syntax.txt

It should be supported also in parser. Adding ampersand to ignored_whitespace_characters in lexer.py, like this:

ignored_whitespace_characters = frozenset(
    [
        # BOM
        0xFEFF,
        # White Space
        0x0009,  # tab
        0x0020,  # space
        # Line Terminator
        0x000A,  # new line
        0x000D,  # carriage return
        # Comma
        0x002C,
        # Ampersand
        0x0026
    ]
)

was sufficient to parse my schema, but I am not sure if it can have some unintended side effects.