Skip to content

Macro #[juniper::graphql_union] does not impl GraphQLTypeAsync #549

New issue

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

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

Already on GitHub? # to your account

Closed
UkonnRa opened this issue Mar 1, 2020 · 1 comment · Fixed by #666
Closed

Macro #[juniper::graphql_union] does not impl GraphQLTypeAsync #549

UkonnRa opened this issue Mar 1, 2020 · 1 comment · Fixed by #666
Labels
area::async Related to async/.await functionality blocker bug Something isn't working help wanted

Comments

@UkonnRa
Copy link

UkonnRa commented Mar 1, 2020

Describe the bug

In the master branch, bacause macro juniper::graphql_union does not impl GraphQLTypeAsync, the async function is not usable

@UkonnRa UkonnRa added bug Something isn't working needs-triage labels Mar 1, 2020
@LegNeato LegNeato added area::async Related to async/.await functionality and removed needs-triage labels Mar 18, 2020
@LegNeato
Copy link
Member

LegNeato commented Mar 18, 2020

Yep, unions and interfaces are not supported yet on async master.

@LegNeato LegNeato pinned this issue Apr 10, 2020
tyranron added a commit that referenced this issue Jun 4, 2020
- reimplement #[derive(GraphQLUnion)] macro to support:
    - both structs and enums
    - generics in type definition
    - multiple #[graphql] attributes
    - external resolver functions
- remove From trait impls generation for enum variants

- reimplement #[graphql_union] macro to support:
    - traits
    - generics in trait definition
    - multiple attributes
    - external resolver functions
    - GraphQLType implemetation for a raw trait object
    - GraphQLTypeAsync implemetation (#549)

- add marker::GraphQLUnion trait

- rewrite "2.5 Unions" section in Book (Juniper user documentation)

- rewrite `codegen` and `codegen_fail` integration tests for GraphQL unions

Additionally:
- re-export `futures` crate in `juniper` for convenient reuse in the generated code without requiring library user to provide `futures` crate by himself (#663)
- use unit type () as default context for EmptyMutation and EmptySubscriptions
- relax Sized trait bound on some GraphQLType and GraphQLTypeAsync definitions, implementations and usages
@tyranron tyranron unpinned this issue Jun 4, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area::async Related to async/.await functionality blocker bug Something isn't working help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants