aruntk / polymer-apollo

🚀 Polymer Apollo Integration
MIT License
78 stars 7 forks source link

Added dataKey options to queries #10

Closed atoy40 closed 7 years ago

atoy40 commented 7 years ago

Allows to use the same "root query" more than one time in the same element.

atoy40 commented 7 years ago

There is may be more elegant ways to do that. For example, if data[key] doesn't exists, but data object contains one (and only one) key, we can get it instead of data[key] Another one can be to analyse the Document object provided to query with gql`` and found the root query name (and also check there is only one root query provided)

Tell me what's your feeling about that.