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

Name '__index' must not begin with '__', which is reserved by GraphQL introspection #91

Closed
simonw opened this issue Nov 19, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@simonw simonw added the bug Something isn't working label Nov 19, 2022
@simonw
Copy link
Owner Author

simonw commented Nov 19, 2022

Found the source of the error here: https://github.com/graphql-python/graphql-core/blob/619a77a7d79415aca63da5d7070249ed0a7ac3b5/src/graphql/type/validate.py#L192

            if name.startswith("__"):
                self.report_error(
                    f"Name {name!r} must not begin with '__',"
                    " which is reserved by GraphQL introspection.",
                    ast_node,
                )

@simonw
Copy link
Owner Author

simonw commented Nov 19, 2022

One of the causes of this is https://fivethirtyeight.datasettes.com/fivethirtyeight/pollster-ratings~2Fpollster-ratings which has a column called:

  "# of Polls for Bias Analysis" INTEGER,

@simonw
Copy link
Owner Author

simonw commented Nov 19, 2022

I'm going to try turning a prefix __ into _0_.

@simonw simonw closed this as completed in 006fd21 Nov 19, 2022
simonw added a commit that referenced this issue Nov 19, 2022
simonw added a commit to simonw/fivethirtyeight-datasette that referenced this issue Nov 19, 2022
simonw added a commit to simonw/fivethirtyeight-datasette that referenced this issue Nov 19, 2022
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

No branches or pull requests

1 participant