Skip to content

Dependencies to query file and schema file are not tracked by the compiler when deriving GraphQLQuery #215

Open
@upsuper

Description

@upsuper

When using #[derive(GraphQLQuery)], after compiling, if you change the query file or the schema file and run cargo build again, it would do nothing.

This is because compiler is unaware of the change to the file.

To fix this, the macro should insert include_str! or include_bytes! into the generated code, so that compiler can be aware of such build dependency.

See pest-parser/pest#272 as an example of this trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions