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"