-
Couldn't load subscription status.
- Fork 168
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I am trying to use a .graphql file generated in the build process using build.rs instead of a static one.
However, changing lines
#[derive(GraphQLQuery)]
#[graphql(
schema_path = "src/schema.graphql",
query_path = "src/query.graphql",
)]
struct Something;into
#[derive(GraphQLQuery)]
#[graphql(
schema_path = concat!(env!("OUT_DIR"), "/schema.graphql"),
query_path = "src/query.graphql",
)]
struct Something;results in a following error (and subsequent errors).
error: proc-macro derive panicked
--> src/main.rs:8:10
|
8 | #[derive(GraphQLQuery)]
| ^^^^^^^^^^^^
|
= help: message: Attribute is well formatted: Error("expected literal")(Is this a limitation of this library or a syntactic limitation of Rust?)
IMHO generating and importing .graphql files is not a rare case and it would be nice if we can have such code or some other alternative options. (If graphql-rust already have some ways to do this, sorry.)
Many thanks,
natasky
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request