Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GraphiQL depends on require()

See original GitHub issue

I’m trying to use GraphiQL with snowpack and this highlighted that GraphiQL uses require internally. Now that there’s a standard for a browser implementation of dynamic loading, can this be refactored to use dynamic import instead? Having the library be dependent upon webpack or browserify feels like the wrong (or at least an out of date) solution.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

cgarniercommented, Jul 15, 2021

I was unable to make it works with vite bundler. So, I forked and ugly fixed to make it esm compliant and make my builds pass. I wont pr this because i m sure it s exactly what you dont want to do 😄 and it will probably break the SSR. I published my package there: Maybe it could help someone else. I hope someone will have time to work on this point because it will be an issue with the “new super fast and cool bundlers of the hell”.

acaocommented, Jun 29, 2020

we tried this and unfortunately it caused issues with webpack tree shaking. we can give it another shot for 1.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

GraphQL query best practices
Use GraphQL variables to provide arguments ... The first query uses a variable ( $dogId ) for the value of the dog field's...
Read more >
How to get graphiql ide while dependancy Injection in graphql ...
Answer by @IndominusByte import graphene from fastapi import FastAPI, Request, Depends from fastapi_jwt_auth import AuthJWT from ...
Read more >
A complete guide to permissions in a GraphQL API
This guide shows you how to use GraphQL directives, GraphQL middleware resolvers, and the GraphQL shield library to implement permissions.
Read more >
Mutations and Input Types - GraphQL
A query language for your API — GraphQL provides a complete description of the data in your API, gives clients the power to...
Read more >
How to Create a Secure Node.js GraphQL API - Toptal
This GraphQL tutorial outlines how to create an API for use in Node.js projects ... can communicate without having to depend on a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found