Comments (15)
makes sense, i'll loosen the version restriction in gql2ts
from gql2ts.
awesome, thanks for the quick work
from gql2ts.
Thanks for the quick reply!
from gql2ts.
@voxmatt can you try installing 1.5.0-alpha.90415fad
and see if that works?
from gql2ts.
Just tried, still getting:
/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:118
if (isInputField(field) || !field.args.length) {
^
TypeError: Cannot read property 'length' of undefined
at generateArgumentsDeclaration (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:118:48)
package.json: "gql2ts": "1.5.0-alpha.90415fad",
from gql2ts.
@voxmatt ahh that's a bug in master that i'm fixing right now. let me cherry-pick that into an earlier version and publish.
from gql2ts.
@voxmatt ok, can you try 1.5.0-alpha.51c55d43
, which is v1.4.3 + #152
from gql2ts.
Sorry @brettjurgens, still errors:
$ GRAPHQL_NO_NAME_WARNING=true gql2ts -n ISchema -i Node -o src/declarations/schema.d.ts build-util/schema.json --legacy
/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:118
if (isInputField(field) || !field.args.length) {
^
TypeError: Cannot read property 'length' of undefined
at generateArgumentsDeclaration (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:118:48)
at filteredFields.map.field (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:170:44)
at Array.map (<anonymous>)
at typeToInterface (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:170:31)
at typeArr.filter.filter.map.type (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:198:10)
at Array.map (<anonymous>)
at typesToInterfaces (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:197:14)
at run (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:204:12)
at Object.exports.schemaToInterfaces (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:206:73)
at Object.exports.generateNamespace (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:209:85)
from gql2ts.
@voxmatt can you make sure that @gql2ts/from-schema
is at 1.5.0-alpha.51c55d43
? that code shouldn't exist in that release (see: https://unpkg.com/@gql2ts/[email protected]/dist/index.js)
from gql2ts.
yep, verified. node_modules/gql2ts/package.json
{
"_from": "[email protected]",
"_id": "[email protected]",
"_inBundle": false,
"_integrity": "sha512-QVLePajCPyVEEUXy808/VD9SvjeEEnQMt6MxD9CxAtaCHsHnJwG8l8BEwd1ITD2tvQny3DIBNRq7SZFDgqU+Qw==",
"_location": "/gql2ts",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "[email protected]",
"name": "gql2ts",
"escapedName": "gql2ts",
"rawSpec": "1.5.0-alpha.51c55d43",
"saveSpec": null,
"fetchSpec": "1.5.0-alpha.51c55d43"
},
Error is:
> GRAPHQL_NO_NAME_WARNING=true gql2ts -n ISchema -i Node -o src/declarations/schema.d.ts build-util/schema.json --legacy
/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:118
if (isInputField(field) || !field.args.length) {
^
TypeError: Cannot read property 'length' of undefined
at generateArgumentsDeclaration (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:118:48)
at filteredFields.map.field (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:170:44)
at Array.map (<anonymous>)
at typeToInterface (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:170:31)
at typeArr.filter.filter.map.type (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:198:10)
at Array.map (<anonymous>)
at typesToInterfaces (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:197:14)
at run (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:204:12)
at Object.exports.schemaToInterfaces (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:206:73)
at Object.exports.generateNamespace (/Users/mtm/clockwise/src/client-web/webapp/node_modules/@gql2ts/from-schema/dist/index.js:209:85)
from gql2ts.
@voxmatt that's for gql2ts
, can you check @gql2ts/from-schema
which is a dependency of gql2ts
. alternatively clear node_modules
and re-install
from gql2ts.
@brettjurgens sorry, yes, there is a mismatch.
In my package.json I have "gql2ts": "1.5.0-alpha.51c55d43",
But diving into @gql2ts/from-schema
shows "version": "1.5.0-alpha.cec79414",
from gql2ts.
makes sense, can you clear that old version and install the later one?
i think that happens because cec79414
> 51c55d43
even though 51c55d43
is more recent
from gql2ts.
okay, sorry about that, there was a little weirdness with yarn holding onto the old packages, but all seems to work now. Thanks!!
from gql2ts.
cool, just published 1.4.4
which is identical 51c55d43
, closing this out
from gql2ts.
Related Issues (20)
- Custom Directives HOT 1
- generated .d.ts lacking exports HOT 3
- `TypeError: Cannot read property 'filter' of undefined` when generating flow/typescript file from schema HOT 6
- Support graphql 14.0.0 HOT 2
- Can u provide an option for no namespace generator HOT 4
- map scalar to native type HOT 3
- Cannot find namespace HOT 14
- how to export my schema?
- Question about fragments vs. inline fragments
- feature request: gql client library as new package HOT 7
- Can't figure out how to make this work from the README HOT 3
- An in-range update of graphql is breaking the build 🚨 HOT 16
- Add eslint-disable to generated types file
- graphql parameters are omitted in typings HOT 1
- A union of object interfaces is formatted oddly with inline fragments HOT 9
- Incorrect error messages when schema contains custom directives
- feature request: add option to output interface props of interfaces as partials for types with separated field resolvers
- An in-range update of prettier is breaking the build 🚨 HOT 2
- Payment required
- @gql2ts/language-typescript > @gql2ts/[email protected] support for graphql 15
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 gql2ts.