Comments (6)
Thanks for the quick reply,
For Apollo
style, the generated code contains import sangria.macros._
. I don't think sangria has published artifact for scala.js. https://mvnrepository.com/artifact/org.sangria-graphql/sangria
For Sangria
code gen style, I believe I had some trouble with scalar
type when the generated code doesn't seem to include the type so it could not be compiled.
from sbt-graphql.
For Sangria
code gen with scalar
type, I will try to use ScalarAlias
to see if it work and report back here.
from sbt-graphql.
Thanks for your feature request 🤗
What do you exactly mean? The generated sources should work for the JVM and scala.js. A shared project could contain all queries, which can be reused on both sides.
The Apollo
style generation generates self contained query/mutation objects, so you don't have to worry about any "how to get the query from source" issues 😎
from sbt-graphql.
For Apollo style, the generated code contains
import sangria.macros._.
I don't think sangria has published artifact for scala.js
Ah, true. We only need that for the document parsing. If we can make this configurable to only use a string, the it would work.
Maybe we can tweak the Apollo style in this direction.
from sbt-graphql.
So 'ScalarAliasworks but not
ScalarType`.
from sbt-graphql.
Thanks for the clarification.
The recent #26 is about the missing support for ScalarType
from sbt-graphql.
Related Issues (20)
- Code generation for unions is flawed HOT 1
- codegen support for 'URI' scalar type HOT 1
- Yet another trouble getting codegen to work HOT 2
- Code generation - The output directory for generated files should be configurable. HOT 1
- Missing Sangria Custom Scalars In Schema Generation HOT 1
- Fix .scalafmt.conf
- Fragment code generation is broken for union types HOT 3
- Stable ordering of output HOT 3
- Add toString to graphqlCodegenStyle, Json HOT 2
- [question] Can I annotate generated classes? HOT 1
- Schema generation from Introspection HOT 5
- How to reorder execution of sbt-graphql plugins? HOT 9
- Code generation question HOT 5
- Examples for common use-cases HOT 5
- about graphql-Java HOT 7
- Multiple schemas generation, is it possible? HOT 8
- Only regenerate Scala files from GraphQL schema if schema changes HOT 1
- Move to github actions HOT 2
- Weird published version v0.1.6 HOT 2
- Question about code generation issue in test phase HOT 6
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 sbt-graphql.