tailcall
                                
                                
                                
                                    tailcall copied to clipboard
                            
                            
                            
                        Create a `@call` operator
The @call operator will allow our users to call the resolver by name that is specified in the root Query and Mutation. Here is an example of how it would work.
schema {
  query: Query
}
type Query {
  posts: [Post] @http(path: "/path")
  user(id: Int): User @http(path: "/user/{{args.id}}")
}
type Post {
  id: Int
  title: String
  userId: Int
  user: User @call(query: "user", args: {id: "{{value.userId}}"})
}
The @call will simply call the resolver that's set in Query.user field with the arguments specified via args.
This feature gives us the ability to define functions using the Tailcall DSL, which means we can add some form of reusability and modularity.
Technical Requirements
- The function can only be called if the input and output type match exactly. In the above example  
Query::userreturns aUserandPost::useralso returns aUserso it's compatible with its return type. Similarly, we can see that the args are also exactly the same. 
/bounty 250
💎 $250 bounty created by tailcallhq
🙋 If you'd like to work on this issue, comment below to get assigned
👉 To claim this bounty, submit a pull request that includes the text /claim #846 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country. 💵 Payment arrives in your account 2-5 days after the bounty is rewarded. 💯 You keep 100% of the bounty award. 👍 If you go above and beyond by cleaning up or enhancing aspects beyond the scope of the PR, a tip may be awarded as a token of appreciation. 🙏 Thank you for contributing to tailcallhq/tailcall!. 🙋♂️ Join our discord channel if you need help.
/attempt #846 Can I get this assigned?
@Khalid6468: The Tailcall Inc. team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
hey @tusharmath . Previously assigned work is done now I am waiting for your confirmation to start working on this one.
/attempt #846 Putting myself on the queue 🤚🏽
@ologbonowiwi: The Tailcall Inc. team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.
@Khalid6468 All the best! Looking forward to your PR.
@Khalid6468 could you please share your status on this?
If it's not much it's might be better to reassign to @ologbonowiwi that made some progress on this
@meskill I haven't made much progress on this one so far and its taking some time to understand the codebase and get familiar. I went through different operator implementations and just started working on the implementation for this one. You can reassign it as it might take a day or two more for me to complete this and it would just be duplication of effort.
💡 @ologbonowiwi submitted a pull request that claims the bounty. You can visit your bounty board to reward.
Action required: Issue inactive for 30 days. Status update or closure in 7 days.
We started to review/make some changes again yesterday.
@ologbonowiwi: Your claim has been rewarded! We'll notify you once it is processed.