-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graphqelm CLI throws error #1
Comments
@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. |
@dillonkearns Thanks for making the changes. Getting a different error now. I installed version 0.0.3 globally ( Running
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: I then get this message:
I didn't really know what to expect but I guess I need to create 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 |
Thank you so much for trying and reporting the issue Mario! I really
appreciate it.
So the issue is that it needs a url, so the command should be
graphqelm https://graphqelm.herokuapp.com/api
It should give a clear message when it's missing, I'll push a fix for that.
Also, I apologize I think it will fail right now unless you manually create
a src/Api/Enum folder and a src/Api/Object folder before running the
command. Obviously not a good user experience, I will fix that in the next
day or two.
Happy Holidays!
…On Mon, Dec 25, 2017 at 8:44 PM Mario Martinez ***@***.***> wrote:
@dillonkearns <https://github.com/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?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/dillonkearns/graphqelm/issues/1#issuecomment-353916767>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUe5pckevqMfqW7aZTUgXmqKPR716Gkks5tEHmagaJpZM4RGCoO>
.
|
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! |
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. |
When I install the graphqelm module, and run
graphqelm
, I get the following error:The text was updated successfully, but these errors were encountered: