Comments (7)
If you are using template tags we need an inline require(..)
to make it work reliably because ReScript doesn't have support for template tags. You can use templateTagAsFunction
which is documented in rescript-apollo-client
when you use a bundler that doesn't support require
. It's a trade-off, template tags can have some benefits over strings. I would love to have a proper solution for this but I raised possible solutions in the rescript compiler that have not been addressed the past 2 years so I wouldn't hold my breath.
from graphql-ppx.
If the require is necessary can the exports be made to be commonjs instead?
from graphql-ppx.
im not recalling what a templateTag is
from graphql-ppx.
By the way, this shouldn't be a problem with webpack5, I have an webpack 5 website deployed that works fine. What is your configuration?
from graphql-ppx.
Hi Jaap
Sorry for the delay...I'm finding this issue again now looking for webpack alternatives.
The build system in question today is vite
from graphql-ppx.
(Not a pressing issue, but I would love to never see webpack again, personally)
from graphql-ppx.
ahh! templateTagIsFunction! found it
from graphql-ppx.
Related Issues (20)
- Installation not working. HOT 7
- Unable to install v1.2.1 HOT 3
- Can't use ppxCustom on 2nd level of graphQL HOT 3
- The tests fail non-deterministically HOT 1
- __typename on unions not working HOT 1
- Repeated fragment in auto-generated query. HOT 11
- Custom Scalar parsing/serializing not working in InputObjects HOT 10
- Settings from bsconfig don't seem to be read
- Error while running external preprocessor - is not recognized as an internal or external command, HOT 2
- Type checking for InputObject arguments.
- Support directives on VARIABLE_DEFINITION
- Docker on the Apple Silicon Mac won't copy the ppx files and use Rosetta
- An import from `GraphQL_PPX.bs.js` appears in `.bs.js`
- Idea: add ability to output GraphQL DocumentNode instead of function call + graphql string
- Support for Rescript 10 HOT 1
- More verbose Errors for partial unions than "Not_found"
- Usage with Dune and Melange
- Support for rescript 11 and uncurried mode HOT 3
- Graphql-PPX expects bsconfig.json not rescript.json
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-ppx.