Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(subscription): support generics in MergedSubscription types #1222

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

mechiru
Copy link
Contributor

@mechiru mechiru commented Jan 29, 2023

Currently, defining a MergedSubscription that contains generics causes errors.

    #[derive(MergedSubscription)]
    struct Subscription<T1, T2>(Subscription1<T1>, Subscription2<T2>)
    where
        T1: Clone + OutputType,
        T2: Clone + OutputType;
   --> tests/merged_object.rs:219:12
    |
219 |     struct Subscription<T1, T2>(Subscription1<T1>, Subscription2<T2>)
    |            ^^^^^^^^^^^^ expected 2 generic arguments
    |
note: struct defined here, with 2 generic parameters: `T1`, `T2`
   --> tests/merged_object.rs:219:12
    |
219 |     struct Subscription<T1, T2>(Subscription1<T1>, Subscription2<T2>)
    |            ^^^^^^^^^^^^ --  --
help: add missing generic arguments
    |
219 |     struct Subscription<T1, T2><T1, T2>(Subscription1<T1>, Subscription2<T2>)
    |            ~~~~~~~~~~~~~~~~~~~~

@sunli829 sunli829 merged commit 06e0e89 into async-graphql:master Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants