Comments (3)
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.
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.
@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)
- Sort dataclass fields - Nullables should be last because thats the Python convention
- Support custom scalars
- Good support for mocking responses, tests
- Support for Fragments Import pattern HOT 1
- websocket / subscriptions support? HOT 2
- Is this client production ready for use? HOT 1
- Custom Headers HOT 1
- Consider updating dataclasses-json package
- Authenticated Endpoint Support
- Failure with requests 2.23.0
- Issues with DateTime ISO fields
- Does this package support union type fragments? HOT 1
- README should mention package is deprecated HOT 3
- Handle Enums
- Initial Makefile
- Translate names to snake-case HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gql-next.