Skip to content

Commit 74e2860

Browse files
committed
graphql_client_codegen: update to graphql-parser 0.3
1 parent a6a8972 commit 74e2860

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

graphql_client_codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition = "2018"
99

1010
[dependencies]
1111
graphql-introspection-query = { version = "0.2.0", path = "../graphql-introspection-query" }
12-
graphql-parser = "^0.2"
12+
graphql-parser = "0.3"
1313
heck = "0.3"
1414
lazy_static = "1.3"
1515
proc-macro2 = { version = "^1.0", features = [] }

graphql_client_codegen/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ pub fn generate_module_token_stream(
6363
.extension()
6464
.and_then(std::ffi::OsStr::to_str)
6565
.unwrap_or("INVALID");
66+
let schema_string;
6667

6768
// Check the schema cache.
6869
let schema: schema::Schema = {
6970
let mut lock = SCHEMA_CACHE.lock().expect("schema cache is poisoned");
7071
match lock.entry(schema_path.to_path_buf()) {
7172
hash_map::Entry::Occupied(o) => o.get().clone(),
7273
hash_map::Entry::Vacant(v) => {
73-
let schema_string = read_file(v.key())?;
74+
schema_string = read_file(v.key())?;
7475
let schema = match schema_extension {
7576
"graphql" | "gql" => {
7677
let s = graphql_parser::schema::parse_schema(&schema_string).map_err(|parser_error| GeneralError(format!("Parser error: {}", parser_error)))?;

0 commit comments

Comments
 (0)