Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose uri field in Product type #336

Closed
jacobarriola opened this issue Sep 7, 2020 · 3 comments
Closed

Expose uri field in Product type #336

jacobarriola opened this issue Sep 7, 2020 · 3 comments

Comments

@jacobarriola
Copy link
Contributor

Is your feature request related to a problem? Please describe.
It would be great if the Product type exposed the uri field similar to other core types such as Page and Post.

Describe the solution you'd like
Add the uri field to the Product type

Describe alternatives you've considered
Using the slug field.

@kidunot89
Copy link
Member

kidunot89 commented Sep 9, 2020

@jacobarriola Have you tried the link field? However, it gives the full URL to the post.

@jacobarriola
Copy link
Contributor Author

@kidunot89 I haven't tried that field yet; I could try a replace() on that string on my app, but it would be cool if the server handles that for consumers so that there's parity between Product and other core types.

@kidunot89
Copy link
Member

kidunot89 commented Oct 15, 2020

@jacobarriola As of v0.6.0 you can access the uri field like this. Products can also be queried with the nodeByUri() query.

query{
  product(...) {
    ... on ContentNode {
      uri
    }
  }
}

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

No branches or pull requests

2 participants