You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into issues using `schema::Document` with strings. I have a
function that looks roughly like this:
```rust
fn load_schema(filename: String) -> schema::Document<'static, String> {
let schema = std::fs::read_to_string(filename);
graphql_parser::schema::parse_schema<String>(&schema).unwrap()
}
```
However this won't compile, because the generated `Document` has taken a
lifetime from `schema` which doesn't outlive the function.
I was looking around the library and saw that the `query::Document` has an
`into_static` function when using `Strings` which resolves this. This
duplicates that functionality for `schema::Document`.
0 commit comments