Coder Social home page Coder Social logo

Comments (2)

LunaticMuch avatar LunaticMuch commented on May 19, 2024

Your logic is correct, but the function introspectionFromSchema is not a Voyager function. It's a function provided by the GraphQL library, so you need to have it ready too. Maybe you could try from https://www.jsdelivr.com/package/npm/graphql

from graphql-voyager.

turnabout avatar turnabout commented on May 19, 2024

Hi. I'm sorry if I'm hijacking this issue, but I'm having the exact same problematic. It's not for a build process specifically, but I'm trying to use Voyager on a static HTML page, using an SDL string as the input.

To gain access to the introspectionFromSchema and buildSchema functions, I'm importing them from a local file that itself imports them from the 'graphql' library and sets them to window.

But when launching the page, I just have an infinitely loading screen. No errors are logged in the console, and I'm a bit at a loss as to what I'm doing wrong or how to go about debugging this.

EDIT: I made a demo reproducing the issue on this repo: graphql-voyager-sdl-static-html-demo

It can be seen at this URL: https://turnabout.github.io/graphql-voyager-sdl-static-html-demo/

This may not be the optimal way to go about doing it, but right now I'm just trying to get something working. I'm not able to send an introspection query, all I have access to is an SDL string just like the OP.

from graphql-voyager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.