-
Notifications
You must be signed in to change notification settings - Fork 432
Resolve some todos in async-await branch #452
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
Resolve some todos in async-await branch #452
Conversation
…panics with query name
…nstrumentisto/juniper into async-await-resolve-some-todos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for so much work! Some small tweaks / questions. Also, can you rebase on async-await
again?
examples/warp_async/Cargo.toml
Outdated
juniper_warp = { git = "https://github.com/graphql-rust/juniper", branch = "async-await", features = ["async"] } | ||
#juniper_codegen = { git = "https://github.com/graphql-rust/juniper", branch = "async-await", features = ["async"] } | ||
#juniper = { git = "https://github.com/graphql-rust/juniper", branch = "async-await", features = ["async"] } | ||
#juniper_warp = { git = "https://github.com/graphql-rust/juniper", branch = "async-await", features = ["async"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Remove these
juniper/src/macros/tests/args.rs
Outdated
// #[doc = "and more details"] | ||
// arg: i32, | ||
// ) -> i32 { 0 } | ||
fn attr_arg_descr(arg: i32) -> i32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong? Also, we have #441 outstanding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
I put it back to todos until #441 is resolved
juniper/src/macros/tests/union.rs
Outdated
} | ||
enum ResolversWithTrailingComma { | ||
Concrete(Concrete), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were these added back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, my mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this fixed? Is this a bad merge?
…panics with query name
…nstrumentisto/juniper into async-await-resolve-some-todos # Conflicts: # examples/warp_async/Cargo.toml # juniper/src/macros/tests/args.rs # juniper_codegen/src/util.rs [skip ci]
@@ -234,6 +234,8 @@ fn test_introspection_possible_types() { | |||
assert_eq!(possible_types, vec!["Human", "Droid"].into_iter().collect()); | |||
} | |||
|
|||
/* | |||
* FIXME: make this work again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is wonky with the merge or you haven't rebased on latest async-await
as this undoes a change we want.
juniper/src/macros/tests/field.rs
Outdated
@@ -95,13 +95,16 @@ impl Root { | |||
Ok(0) | |||
} | |||
|
|||
/* | |||
* FIXME: make this work again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like you need to rebase or a bad merge?
juniper/src/macros/tests/union.rs
Outdated
} | ||
enum ResolversWithTrailingComma { | ||
Concrete(Concrete), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this fixed? Is this a bad merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing some weirdness where stuff in the async-await
branch is undone. Not sure if you just need to rebase or there is something else going on.
…nstrumentisto/juniper into async-await-resolve-some-todos # Conflicts: # juniper/src/macros/tests/args.rs [skip ci]
Yes, git messed everything up while merging. Sorry for that. |
I'm sorry I didn't see this before, but I'm not actually on board with using It's a nice library, but it just adds a bit of syntax sugar, and it very well might differ from the semantics of compiler support, which isn't on the near-horizon. Also 99% of the code will be auto-generated by the macros, so we want to avoid that extra dependency. |
Could you handle reverting, @nWacky ? |
Yes, I'll remove async-trait today. Juniper's macros don't depend on async-trait, I wrote all lifetimes by hand |
Thanks. I think we will want to merge the async branch in the next few days to avoid extra churn. I also have some bigger refactorings upcoming that would affect subscriptions, we might want to chat about that on Gitter or somewhere. |
Yeah, that would be great |
@theduke I converted a project at work to async_trait and it made the implementations much more readable as everything didn't have to have |
I have a type system change which gets rid of Not 100% sure yet if it will work out, but if it does it should be ready soon. |
This PR resolves some todos in
async-await
branch.Changelog:
__juniper_extract_generic
macroresolve_into_type_async
toGraphQLTypeAsync
for asynchronous fragments resolvingGraphQLTypeAsync
withasync-trait
, update macrosself::name(info)
)