Git Product home page Git Product logo

Comments (3)

miketheman avatar miketheman commented on June 12, 2024 1

Similar issue - pointing the schema configuration directive at GitHub's v4 API produces a similar response - since queries that endpoint must be authenticated.
https://developer.github.com/v4/guides/intro-to-graphql/#discovering-the-graphql-api

from gql-next.

P6rguVyrst avatar P6rguVyrst commented on June 12, 2024

Screenshot 2020-02-19 at 20 10 47

After editing the source files in my virtualenv to accept my custom headers I ran into this.

I don't know much about GraphQL, but is there a valid reason for a static code generator to be able to access http servers to gather more info about schemas?
If that's the case, then it feels like a major turn off for a project that otherwise looks really promising.

Can you have an offline mode where I don't have to access external schema endpoints and provide authentication information?

from gql-next.

rdebroiz avatar rdebroiz commented on June 12, 2024

@P6rguVyrst I think the reasonj why they need your graphql endpoint is not to access the schema, It's supposed to work with a file.

def load_introspection_from_file(filename):
    with open(filename, 'r') as fin:
        return json.load(fin)


def load_schema(uri):
    introspection = load_introspection_from_file(uri) if os.path.isfile(uri) else load_introspection_from_server(uri)
    return build_client_schema(introspection)

But because they also want to provide a configured client ready to use for later (with the given graphql endpoint) in the generated code.
I agree with you that it should definitely be out of the scope of the library.

Anyway it looks like the project has been deserted. I wonder if this was because they were a major flaw in the way it is supposed to work, or just because they move on something else.

In the later case I could be interested to continue the work one day, I like the idea a lot. It reminds me https://github.com/honza/anosql (but better thanks to the generated dataclass) for graphql.

from gql-next.

Related Issues (17)

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.