Skip to content

GraphQLQuery macro creates incompatible types for fragments shared between queries #312

Open
@yuyoyuppe

Description

@yuyoyuppe

I'm using Github v4 API to query some repo state and have some fragments like this:

fragment PullRequestView on PullRequest {
# ...
}

fragment IssueView on Issue {
# ...
}

to later use them in multiple queries. GraphQLQuery macro currently generates a Rust module with all fragments used by a query for each query encountered, producing incompatible types with identical layout.

I'm currently using a workaround described here, but it would be nice to have an option for generating a single common type for chosen fragment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions