Code Monkey home page Code Monkey logo

Comments (5)

martimatix avatar martimatix commented on May 18, 2024 1

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.

dillonkearns avatar dillonkearns commented on May 18, 2024

@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.

martimatix avatar martimatix commented on May 18, 2024

@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.

dillonkearns avatar dillonkearns commented on May 18, 2024

from elm-graphql.

dillonkearns avatar dillonkearns commented on May 18, 2024

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:

1__dillon_dillons-macbook-pro____src_graphqelm__zsh_

Don't hesitate to ping me with more issues/questions/feedback. Thanks!

from elm-graphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.