Open bramvanderholst opened 7 years ago
I have for example the following (simplified) element:
<script> Polymer({ is: "rd-page-link", properties: { pageId: String, pageObject: Object }, apollo: { PageLink: { query: Apollo.gql`query GetPageLink($identifier: ID!) { pageObject: Page(id: $identifier) { title, urlKey } }`, options: '_queryOptions(pageId)', } }, _queryOptions: function (pageId) { return { variables: { identifier: pageId }, }; }, }) </script>
Wouldn't it be nice if you didn't have to define the link between the GraphQL variable $identifier and the polymer property pageId. Would be nice if the following just worked.
$identifier
pageId
<script> Polymer({ is: "rd-page-link", properties: { pageId: String, pageObject: Object }, apollo: { PageLink: { query: Apollo.gql`query GetPageLink($pageId: ID!) { pageObject: Page(id: $pageId) { title, urlKey } }`, } }, }) </script>
And to move further, would be nice if we didn't need the key in the apollo object, doesn't serve any purpose?
<script> Polymer({ is: "rd-page-link", properties: { pageId: String, pageObject: Object }, apollo: [{ query: Apollo.gql`query GetPageLink($pageId: ID!) { pageObject: Page(id: $pageId) { title, urlKey } }`, }], }) </script>
@bramvanderholst Thanks for the feedback. :) . Added this in the pipeline.
I have for example the following (simplified) element:
Wouldn't it be nice if you didn't have to define the link between the GraphQL variable
$identifier
and the polymer propertypageId
. Would be nice if the following just worked.And to move further, would be nice if we didn't need the key in the apollo object, doesn't serve any purpose?