File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ edition = "2018"
9
9
10
10
[dependencies ]
11
11
graphql-introspection-query = { version = " 0.2.0" , path = " ../graphql-introspection-query" }
12
- graphql-parser = " ^0.2 "
12
+ graphql-parser = " 0.3 "
13
13
heck = " 0.3"
14
14
lazy_static = " 1.3"
15
15
proc-macro2 = { version = " ^1.0" , features = [] }
Original file line number Diff line number Diff line change @@ -63,14 +63,15 @@ pub fn generate_module_token_stream(
63
63
. extension ( )
64
64
. and_then ( std:: ffi:: OsStr :: to_str)
65
65
. unwrap_or ( "INVALID" ) ;
66
+ let schema_string;
66
67
67
68
// Check the schema cache.
68
69
let schema: schema:: Schema = {
69
70
let mut lock = SCHEMA_CACHE . lock ( ) . expect ( "schema cache is poisoned" ) ;
70
71
match lock. entry ( schema_path. to_path_buf ( ) ) {
71
72
hash_map:: Entry :: Occupied ( o) => o. get ( ) . clone ( ) ,
72
73
hash_map:: Entry :: Vacant ( v) => {
73
- let schema_string = read_file ( v. key ( ) ) ?;
74
+ schema_string = read_file ( v. key ( ) ) ?;
74
75
let schema = match schema_extension {
75
76
"graphql" | "gql" => {
76
77
let s = graphql_parser:: schema:: parse_schema ( & schema_string) . map_err ( |parser_error| GeneralError ( format ! ( "Parser error: {}" , parser_error) ) ) ?;
You can’t perform that action at this time.
0 commit comments