Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Prevent unnecessary requests to NextBus #1

Closed
elliottsj opened this issue Sep 6, 2016 · 2 comments
Closed

Prevent unnecessary requests to NextBus #1

elliottsj opened this issue Sep 6, 2016 · 2 comments

Comments

@elliottsj
Copy link
Owner

e.g.

query {
  agency(tag: "ttc") {
    routes {
      edges {
        node {
          id
          shortTitle
          tag
          title
        }
      }
    }
  }
}

With routes being a field nested in an agency, GraphQL will first try to resolve the agency before resolving the routes; an unnecessary request to http://webservices.nextbus.com/service/publicXMLFeed?command=agencyList is made when only the agency's tag is required to fetch routes from http://webservices.nextbus.com/service/publicXMLFeed?command=routeList&a=ttc

@elliottsj
Copy link
Owner Author

Possibly use https://github.com/facebook/dataloader

@elliottsj
Copy link
Owner Author

More discussion: graphql/graphql-js#111

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant