Comments (9)
As of the state right now, there are only two ways to properly consume types from npm packages:
- Either Convince the project maintainers to provide a build step to basically recursively copy all
src/
files todist/
to the same position as the ES5 files with aflow.js
suffix (AFAIK draft.js will do this in the future) - Or create and consume a libdef file separately (as currently done in
flow-typed
)
Option 2 will also be required if you try to use an minified browser build of course, since in my knowledge there is no automated way to extract all types into a single file ...
For this project, Option 1 would actually be a good fit
from express-graphql.
Also, you may track progress with graphql-js
here graphql/graphql-js#359
from express-graphql.
Just found this: flow-typed/flow-typed#16
from express-graphql.
@leebyron Curious if #1 is something you'd consider?
from express-graphql.
Yes, this is something I think is worth considering, though the graphql package itself should export types in the same fashion first.
It's also worth point out that the Flow team does not encourage libraries export types in this way due to possible breakage when Flow updates.
from express-graphql.
Ah, interesting—that makes sense.
from express-graphql.
We're starting work on flow gen-flow-files, which consumes Flow code and outputs .flow files containing only the types exported. It's alpha-level and we're still iterating on it, so use at your own peril!
:)
from express-graphql.
Yep, incredible synchronous work of Facebook's OSS teams.
Lee posted about flow 0.32 in tweeter yesterday.
from express-graphql.
Thanks—& yes, they're OTS.
from express-graphql.
Related Issues (20)
- depth-limit HOT 1
- Is there a way to customize a logger HOT 1
- Unhandled errors does not provide mutation or query name HOT 1
- Graphiql playground not displayed in the browser HOT 1
- UnhandledPromiseRejectionWarning: Unhandled promise rejection HOT 1
- Why isn't the callback of app.listen() called when using express-graphql middleware? HOT 4
- Build when installed from GitHub HOT 1
- throw new MiddlewareError(`Type ${type} exists in middleware but is missing in Schema.`);
- TypeScript - merge declarations for request and response types
- Cannot install with graphql 16.0.1 HOT 10
- Update GraphQL Schema at runtime HOT 4
- Graphql 16.2.0 support HOT 9
- Processing timeout HOT 1
- About compatible version for an old graphql and node
- Swallow GraphQL errors by Express HOT 6
- Peer dependency error on new installation of graphql HOT 8
- Unmet Peer version, need to update supported dependencies HOT 9
- revert revert "Allow custom handling of runtime query errors" HOT 1
- Unable to find Prisma Client in GraphQL context. Please provide it under the `context[\"prisma\"]` key. HOT 1
- Support for running method on every call
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 express-graphql.