GithubHelp home page GithubHelp logo

Comments (10)

Poincare avatar Poincare commented on May 22, 2024

Yeah, definitely! In fact, that would help solve #17 as well since people could just build stuff on top of the ExtractGQL class or similar. Would be happy to accept PRs on this and also get involved in the implementation.

from persistgraphql.

lewisf avatar lewisf commented on May 22, 2024

awesome, this is something that im happy to take a look at in the next week or so.

where should this go? should an apollographql/extract-gql repo be created for this? or should i just create a repo to do this and transfer it over later?

from persistgraphql.

stubailo avatar stubailo commented on May 22, 2024

@lewisf I think the best option is for you to create a prototype on a personal repo, then we can move it into the organization afterwards?

We should also see if this can replace https://github.com/apollographql/graphql-document-collector, which is pretty old and I'm not sure many people use it. The intention was to do something similar.

from persistgraphql.

lewisf avatar lewisf commented on May 22, 2024

Okay, sounds reasonable, I'll give it a shot

from persistgraphql.

lewisf avatar lewisf commented on May 22, 2024

Quick update after speaking with @Poincare. It looks like the ExtractGQL class is exactly what should get extracted.

After extracting it we'd be able to use it to solve #17 as mentioned above, and I'd be able to use it to address apollographql/apollo-tooling#25.

I'm going to work on this and seeing if anything needs to change (public/private methods) etc. We can leave this issue open until that package exists and is integrated back into persistgraphql.

from persistgraphql.

lewisf avatar lewisf commented on May 22, 2024

Okay, I've done some initial work in extracting ExtractGQL here:
https://github.com/lewisf/extract-gql

I've even tried using it in another project locally and it worked well (yay). I haven't done an audit of the public interface but it's good to know that the extraction was pretty straightforward due to how ExtractGQL was written here.

Some key improvements I want to make to extract-gql before publishing it as a package are going to be documented there. Namely:

Please let me know if there are any other issues that should be addressed before extract-gql should go live.

I've also opened up other issues on it based on me trying to use it with an existing project we have here at Coursera, but I don't think those are blocking the re-integration of extract-gql back into persistgraphql.

from persistgraphql.

Poincare avatar Poincare commented on May 22, 2024

@lewisf Great! Most of those issues and general direction look good to me.

However, I did think that the package you would be building wouldn't actually include any of the CLI portions that this tool provides. Instead, it should just focus on providing a simple library that allows other projects (e.g. apollo-codegen) to build on top of the query extraction. Then, persistgraphql can simply use that library internally rather than having the ExtractGQL class as it is currently implemented and persistgraphql would provide the CLI functionality on top. Does that sound reasonable?

from persistgraphql.

lewisf avatar lewisf commented on May 22, 2024

@Poincare yes that definitely does sound reasonable. I'll go ahead and make that modification to extract-gql's responsibilities

from persistgraphql.

Poincare avatar Poincare commented on May 22, 2024

Hey @lewisf any progress on this? Any way I can help?

from persistgraphql.

lewisf avatar lewisf commented on May 22, 2024

@Poincare sorry! i had to shift focuses to prioritize something else -- happy to chat about this if you wanted to take a stab at this

from persistgraphql.

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.