graphql-kit / graphql-voyager

🛰️ Represent any GraphQL API as an interactive graph
https://graphql-kit.com/graphql-voyager/
MIT License
7.74k stars 514 forks source link

Import by nginx or CDN #19

Closed joserochadocarmo closed 7 years ago

joserochadocarmo commented 7 years ago

Why can not I import from a CDN or NGINX?

    <head>
    <script src="//cdn.jsdelivr.net/react/15.4.2/react.min.js"></script>
    <script src="//cdn.jsdelivr.net/react/15.4.2/react-dom.min.js"></script>
    <script src="https://apis.guru/graphql-voyager/releases/v1.x/voyager.min.js" ></script>
    <link rel="stylesheet" href="https://apis.guru/graphql-voyager/releases/v1.x/voyager.css"/>
    </head>

Error: Uncaught DOMException: Failed to construct 'Worker': Script at 'https://apis.guru/graphql-voyager/releases/v1.x/voyager.worker.js' cannot be accessed from origin 'http://localhost:3000'.

RomanHotsiy commented 7 years ago

@joserochadocarmo sorry for long reply. We are busy with other projects right now. I will investigate and let you know ASAP.

RomanHotsiy commented 7 years ago

@joserochadocarmo could you check with the latest version? I changed worker to load over XHR so should support CORS now

joserochadocarmo commented 7 years ago

Work!!! Thanks a lot man!!!