Git Product home page Git Product logo

Comments (3)

vermiculus avatar vermiculus commented on July 17, 2024

Re graphql -- do you want me to throw what I have up on MELPA?

from ghub.

tarsius avatar tarsius commented on July 17, 2024

Okay, I wasn't expecting for you to respond that quickly...

Re graphql -- do you want me to throw what I have up on MELPA?

I tried that out last night ... and I am skeptical. I think graphql.el still needs more work.

Maybe that's just because it was late at night, but I could not translate this trivial query to your dsl:

query {
  __schema {
    types {
      name
      kind
      description
      fields {
        name
      }
    }
  }
}

I either got an error (probably my fault), or the part kind ... fields { name } got discarded by your code (probably a bug). You should probably go through all the examples in the Github and Graphql tutorials and write all the example code using your dsl.

That would help finding bugs and also serve as documentation.

Support Graphql

I have learned SQL using the dsl provided by emacsql.el, which wasn't able to express everything and had some bugs. I don't want to go through the same with GraphQL and instead learn the real thing first.

So far ghub.el isn't too opinionated and I want to keep it that way. With regards to ghub-query and ghub-mutatation that means that it should take a Graphql string as QUERY and MUTATION (but expect a json-like alist as VARIABLES and return a json-like alist). Once more I will leave the opinionated parts for other packages to implement.

So users will have to use (ghub-query (graphql-encode ...) ...) or can also just (ghub-query "query {...}" ...).

from ghub.

vermiculus avatar vermiculus commented on July 17, 2024

I'm still working on a lot of the more advanced GraphQL syntax (like fragments and aliased), but explicit queries should work -- they've worked enough for me to develop some basic real-world queries to GitHub. Check out the examples.el in that directory (or some such file). I've been working off of http://graphql.org/learn/.

Definitely learning GraphQL proper would be prerequisite for using graphql.el :-)

(ghub-query (graphql-encode ...) ...) looks appropriate to me and is in-line with the spirit of ghub.

from ghub.

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.