Altair: Graphql Explorer Plugin no longer works with Chrome V80+

Created on 13 Feb 2020  ·  8Comments  ·  Source: imolorhe/altair

Describe the bug
When using the Graphql Explorer plugin on Chrome V80+ you will get the following errors
and won't be able to use the plugin (The button will show but clicking on it doesn't do anything)

Uncaught Error: No custom element support or polyfill found!
    at main.js:6
    at Object.<anonymous> (main.js:6)
    at n (main.js:1)
    at Module.<anonymous> (main.js:31)
    at n (main.js:1)
    at Object.<anonymous> (main.js:6)
    at n (main.js:1)
    at main.js:1
    at main.js:1

with main.js having

        var e = document.registerElement || document.register;
        if (!e)
            throw new Error("No custom element support or polyfill found!");

To Reproduce
Steps to reproduce the behavior:

  1. Have Chrome V.>=80
  2. Enable experimental features
  3. Add the graphiql explorer plugin
  4. Try to click on it.
  5. Look at the console

Expected behavior
Not throw an error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: OSX
  • Browser Chrome
  • Platform: Chrome Extension (although I think the issue persists on firefox as well)
  • Version: >= 80

Additional context
I believe this is related to document.registerElement and document.register being deprecated see here and here, but not fully sure.

In Progress Plugin bug

All 8 comments

👋🏾Thanks for opening your first issue here! Be sure to follow the issue template! ✌🏾

Thanks for reporting this! I'd look into it as soon as I can.

On a side note, I'm curious: how did you hear about Altair, and about the GraphQL explorer plugin?

We use graphql for a lot of the api's at my company. One of my coworkers who really started the use of graphql, also really likes Altair, and so he introduced the rest of us to it. We use it a lot for experimentation. As for the plugin, it was mostly just exploring the Altair settings, although we've also used graphiql and its explorer (which is pretty similar).

Can you confirm if the latest version of the plugin works for you?

Sorry for late reply. Should I build 2.4.4 from source?

It should work without doing anything.

Looks like it works now! Getting a bunch of

Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 

errors in the console, but it doesn't seem to affect main functionality. Thanks for the update

Great! Part of the benefits of having a plugin system. The new version of the plugin can be released without publishing the core package. 🙂

Closing this now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

imolorhe picture imolorhe  ·  3Comments

aoudiamoncef picture aoudiamoncef  ·  5Comments

simPod picture simPod  ·  5Comments

MCSH picture MCSH  ·  7Comments

bsr203 picture bsr203  ·  12Comments