tailcallhq / tailcall

High Performance GraphQL Runtime
https://tailcall.run
Apache License 2.0
1.26k stars 237 forks source link

Singularization Not Working Correctly for Certain Field Names #2564

Closed amitksingh1490 closed 1 month ago

amitksingh1490 commented 1 month ago

Issue Description

The singularization process in the config generator is not working correctly in certain cases. For example, the field name orderStatus is being incorrectly converted to OrderStatu instead of OrderStatus.

Example:

Given the following configuration:

  - curl:
      src: "https://example.com/api/v2/order/597ad6e9-ee1a-406a-842f-c9c62564d24e/status/"
      fieldName: "orderStatus"
      headers: *headers

Current Behavior:

The generated GraphQL query incorrectly singularizes the type name:

orderStatus(id: String!): OrderStatu @http(path: "/api/v2/order/{{.args.id}}/status/")

Expected Behavior:

The singularization should correctly handle the field name:

orderStatus(id: String!): OrderStatus @http(path: "/api/v2/order/{{.args.id}}/status/")
amitksingh1490 commented 1 month ago

/bounty 25$

algora-pbc[bot] commented 1 month ago

💎 $25 bounty • Tailcall Inc.

Steps to solve:

  1. Start working: Comment /attempt #2564 with your implementation plan
  2. Submit work: Create a pull request including /claim #2564 in the PR body to claim the bounty
  3. 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. 💵 More about our bounty program.

Attempt Started (GMT+0) Solution
🔴 @Bhavyajain21 Jul 28, 2024, 1:59:24 PM WIP
🟢 @laststylebender14 Jul 28, 2024, 3:34:42 PM #2566
Bhavyajain21 commented 1 month ago

/attempt #2564

Algora profile Completed bounties Tech Active attempts Options
@Bhavyajain21    3 tailcallhq bounties
+ 11 bounties from 2 projects
Rust, TypeScript,
JavaScript & more
Cancel attempt
laststylebender14 commented 1 month ago

/attempt #2564

algora-pbc[bot] commented 1 month ago

[!NOTE] The user @Bhavyajain21 is already attempting to complete issue #2564 and claim the bounty. We recommend checking in on @Bhavyajain21's progress, and potentially collaborating, before starting a new solution.

algora-pbc[bot] commented 1 month ago

💡 @laststylebender14 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] commented 1 month ago

@Bhavyajain21: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] commented 1 month ago

@laststylebender14: You've been awarded a $25 bounty by tailcallhq! 👉 Complete your Algora onboarding to collect the bounty.

algora-pbc[bot] commented 1 month ago

🎉🎈 @laststylebender14 has been awarded $25! 🎈🎊