tailcall
tailcall copied to clipboard
Types with Single Fields Not Flattened in GraphQL Config Generation
Description With the provided configuration, some types with single fields are not getting flattened as expected. The relevant configuration is given below:
headers: &headers
appversion: "11.3.1-WEB"
authorization: "Bearer <Put your token here>"
platform: "WEB"
inputs:
- curl:
src: "https://cx.zepto.co.in/api/v1/pass/overview"
fieldName: "overview"
headers: *headers
- curl:
src: "https://api.zepto.co.in/api/v3/inventory/catalogue/store-products/?store_id=bc6a4a81-1c35-457e-a732-7ca7198ee2ef&subcategory_id=84f270cf-ae95-4d61-a556-b35b563fb947&page_number=2&user_session_id=4d8c9ce6-d3b2-45e3-a22c-d9bf0c99b589"
fieldName: "storeProducts"
headers: *headers
- curl:
src: https://api.zepto.co.in/api/v2/order/?page_number=1
fieldName: "myOrders"
headers: *headers
- curl:
src: "https://api.zepto.co.in/api/v1/order/be2574f3-8d25-4d95-9ac8-adf4b745381f/"
fieldName: "orderDetails"
headers: *headers
- curl:
src: "https://api.zepto.co.in/api/v1/user/customer/addresses/"
fieldName: "addresses"
headers: *headers
- curl:
src: "https://www.zeptonow.com/api/wallet/transactions"
fieldName: "transactions"
headers:
authorization: "<Put your token here>"
- curl:
src: "https://api-gateway.zepto.co.in/recipe-service/api/v1/recipes?pageNumber=0&pageSize=10"
fieldName: "recipes"
headers: *headers
- curl:
src: "https://api.zepto.co.in/api/v2/inventory/catalogue/recommended-products?store_id=bc6a4a81-1c35-457e-a732-7ca7198ee2ef&preview_mode=true&is_trending_feed_enabled=true&is_zepto_three_enabled=true&is_trending_feed_experiment_enabled=true"
fieldName: "recommendedProducts"
headers: *headers
preset:
mergeType: 0.75
consolidateURL: 0.5
useBetterNames: true
treeShake: true
output:
path: "./generated.graphql"
format: "graphQL"
schema:
query: "Query"
/bounty 50$
💎 $50 bounty • Tailcall Inc.
Steps to solve:
- Start working: Comment
/attempt #2558with your implementation plan - Submit work: Create a pull request including
/claim #2558in 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. 💵 More about our bounty program.
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| 🔴 @Shylock-Hg | Jul 29, 2024, 2:10:48 AM | WIP |
| 🟢 @dekkku | #2723 |
This feature was developed here — https://github.com/tailcallhq/tailcall/pull/2356
/attempt #2558
| Algora profile | Completed bounties | Tech | Active attempts | Options |
|---|---|---|---|---|
| @Shylock-Hg | 9 tailcallhq bounties + 3 bounties from 3 projects |
C++, C, Shell & more |
Cancel attempt |
@amitksingh1490 I think you should add
unwrapSingleFieldTypes: true
to preset.
@amitksingh1490 I think you should add
unwrapSingleFieldTypes: trueto
preset.
Already done in https://github.com/tailcallhq/tailcall/issues/2555
@Shylock-Hg: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏
The bounty is up for grabs! Everyone is welcome to /attempt #2558 🙌
💡 @dekkku submitted a pull request that claims the bounty. You can visit your bounty board to reward.