tailcall
tailcall copied to clipboard
bug(config): input types loose out on provided graphQL documentation
Documentation isn't copied into the blueprint for input types from configurations. For eg:
"""
Some Documentation
"""
input Foo {
id: Int!
}
While using a configuration with an input type like the above, documentation isn't copied in the final schema.
Technical Requirements
- Copy the documentation into the blueprint
- Ensure integration tests are added
/bounty 10$
💎 $10 bounty • Tailcall Inc.
Steps to solve:
- Start working: Comment
/attempt #1625with your implementation plan - Submit work: Create a pull request including
/claim #1625in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
🙏 Thank you for contributing to tailcallhq/tailcall! 🧐 Checkout our guidelines before you get started.
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| 🔴 @ssddOnTop | Apr 2, 2024, 7:37:58 AM | WIP |
| 🔴 @LED-0102 | Apr 3, 2024, 7:50:48 AM | WIP |
| 🟢 @sn99 | Apr 4, 2024, 11:29:10 AM | WIP |
| 🟢 @emekaokoli19 | May 24, 2024, 12:43:06 AM | #2015 |
/attempt
| Algora profile | Completed bounties | Tech | Active attempts | Options |
|---|---|---|---|---|
| @ssddOnTop | 32 tailcallhq bounties | Rust, Java, C & more |
Cancel attempt |
cancelling my attempt.. I am busy with some other work.
For anyone who wants to attempt:
in from_document.rs
convert:
TypeKind::InputObject(input_object_type) => {
to_input_object(input_object_type, &type_definition.node.directives).some()
}
to
TypeKind::InputObject(input_object_type) => {
to_input_object(input_object_type, &type_definition.node.description, &type_definition.node.directives)
}
and the new function should look like:
fn to_input_object(
input_object_type: InputObjectType,
description: &Option<Positioned<String>>,
directives: &[Positioned<ConstDirective>],
) -> Valid<config::Type, String> {
to_input_object_fields(&input_object_type.fields)
.fuse(Protected::from_directives(directives.iter()))
.map(|(fields, protected)| {
let doc = description.to_owned().map(|pos| pos.node);
config::Type { fields, protected, doc, ..Default::default() }
})
}
now you just need to make sure it's passed to blueprint and write the tests as described in issue.
@LED-0102: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏
[!NOTE] The user @LED-0102 is already attempting to complete issue #1625 and claim the bounty. We recommend checking in on @LED-0102's progress, and potentially collaborating, before starting a new solution.
@tusharmath I made the PR based on the suggestions above: https://github.com/tailcallhq/tailcall/issues/1625#issuecomment-2031426868.
[!NOTE] The user @sn99 is already attempting to complete issue #1625 and claim the bounty. We recommend checking in on @sn99's progress, and potentially collaborating, before starting a new solution.
💡 @emekaokoli19 submitted a pull request that claims the bounty. You can visit your bounty board to reward.