reach-digital / polymer-apollo-client

Polymer Apollo GraphQL Client web components
MIT License
29 stars 5 forks source link

Not refetch data on change graphql query #12

Open fatuk opened 6 years ago

fatuk commented 6 years ago

I was trying to implement change per page behaviour. And polymer-apollo-client doesn't update data from server.

<graphql-query
      hold="[[shouldHold]]"
      result="{{alertsData}}">
      query {
        alertsAllHosts(sortBy: {
          field: "reported_at",
          direction: "ASC"
        }, first: {{first}}) {
          _id
          title
        }
      }
  </graphql-query>
paales commented 6 years ago

@fatuk You should pass the arguments via the variables instead of using the template engine. I don't think it can properly handle the dynamic query templates.