Skip to content

working with nested/plural fields  #8

Closed
@lfender6445

Description

@lfender6445

Given the following json response

export default {
  "geo": [
    {
      "count": "59",
      "geocode": "27.40285,-82.551309",
      "name": "34270, FL",
      "radius": "10",
      "search_type": "ZIP",
      "seopath": "zip/34270-Apartments-For-Rent/",
      "sortfield": "is34270",
      "location_slug": "34270",
      "map_url": "zip=34270"
    }
  ],
  "listing": [
    {
      "propertyname": "342 Ave E",
      "listingid": "LV140083191",
      "listingseopath": "apartments/New-Jersey/Bayonne/342-Ave-E/LV140083191/"
    }
  ]
}

I was hoping for a type tree that might let me do something like this:

query {
  autocomplete(limit: 1) {
    geo {
      count
    }
    listing {
      listingseopath
    }
  }
}

I've thought about using typecomposer to create custom fields / resolution for geo but was wondering if you had ideas about achieving this with other means

This works but returns all fields

query {
  autocomplete() {
    geo 
    listing
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions