Comments (5)
I may be misunderstanding, but does:
let mut file = File::open("schema.graphql").expect("Unable to open file");
let mut contents = String::new();
file.read_to_string(&mut contents);
let definitions = gqlidl::parse_schema(contents.as_str()).unwrap();
not work for you?
from graphql-idl-parser.
I did that, but that's where I ran into issues. I wanted to iterate through the definitions and do different things with the fields of the enum cases:
for def in definitions {
match def {
TypeDefinition::ScalarType(scalar) => {
println!("{}", scalar.name);
},
...
But all the enum fields are private.
from graphql-idl-parser.
Ah, I see. Sure, let me update them!
from graphql-idl-parser.
Sorry, this is taking a bit longer to fix because apparently this crate no longer works on Rust 1.26 due to changes in dependent libraries!
from graphql-idl-parser.
No rush. Thanks for updating it
from graphql-idl-parser.
Related Issues (5)
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 graphql-idl-parser.