Comments (5)
Great work, Dillon! I ran graphqelm on the Star Wars API and the Github API using the auth header - that help message does its job - and both generated Elm files nicely. ๐
If I find anything else, I'll let you know. I'm Excited about this project and hope to see it grow in 2018.
from elm-graphql.
@martimatix thank you for reporting! I pushed a fix, should be all good now. I would love your feedback if you play around with it.
from elm-graphql.
@dillonkearns Thanks for making the changes. Getting a different error now.
I installed version 0.0.3 globally (npm i -g graphqelm
).
Running $ graphqelm
, I get the following error message:
args { _: [] }
endpoint: undefined
error TypeError: Parameter "url" must be a string, not undefined
at Url.parse (url.js:79:11)
at urlParse (url.js:73:5)
at n (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:224151)
at /Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:124795
at new n (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:124761)
at Object.n (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:124608)
at Object.o (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:124438)
at t.<anonymous> (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:123788)
at n (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:123088)
at Object.next (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:122423)
This is better than before because the program is telling me that I need to enter a URL.
I tried the Star Wars API on heroku as an argument: $ graphqelm https://graphqelm.herokuapp.com/api
I then get this message:
args { _: [ 'https://graphqelm.herokuapp.com/api' ] }
endpoint: https://graphqelm.herokuapp.com/api
fs.js:634
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open './src/Api/Enum/Episode.elm'
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.writeFileSync (fs.js:1327:33)
at Array.<anonymous> (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:42726)
at Function.e [as func] (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:76830)
at _ (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:45432)
at r (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:75266)
at Object.callback (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:75664)
at _ (/Users/martimatix/.nvm/versions/node/v6.1.0/lib/node_modules/graphqelm/dist/bundle.js:1:79085)
at Timeout.p [as _onTimeout] (/U%
I didn't really know what to expect but I guess I need to create ./src/Api/Enum/Episode.elm
. After creating that file and installing the node module locally, the error message is similar to above but it complains that it can't find: './src/Api/Object/Character.elm'
.
I stopped here because I felt that I was missing something. Do I need to create an elm file for each of the types of the graphql API prior to running the graphelm
command?
from elm-graphql.
from elm-graphql.
Whoops, I missed the second part of your message there, looks like you already figured out the issue with needing to create those directories. I've published a new version with a fix so that should all be working now! And it includes a change to print the usage info if you run the command without a url:
Don't hesitate to ping me with more issues/questions/feedback. Thanks!
from elm-graphql.
Related Issues (20)
- Enhancement - Add support for Dgraph HOT 1
- non null list of non null list ofโฆ HOT 6
- Include an exhaustive query for each type HOT 3
- elm-graphql generation fails if there are no columns selected (Hasura) HOT 6
- Add operationName to mutation request body HOT 1
- Enum with underscore as a leading character, changed after generating elm code. HOT 1
- Scalar decoder fails when the field contains an object. HOT 1
- Scalars should not be encoded as json in mutations HOT 3
- Enforce nonempty list in required list arguments HOT 3
- Selecting implementation attributes from interfaces HOT 2
- Corrupt package data for 5.0.5? HOT 1
- Requesting feedback on the following changes to the serializeChildren function regarding field hashing HOT 2
- Can not find ScalarCodecs HOT 1
- Feature request: Convenience functions for primitive comparisons HOT 3
- Idea: serialize invalid JSON Input Values as arguments
- Missing fragment in Interface `Fragments` type HOT 1
- Idea: include deprecation warnings into the generated code as comments HOT 1
- Building large queries takes a long time and pauses the UI HOT 2
- Encode function for enums is missing HOT 1
- Generate input object helpers HOT 1
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 elm-graphql.