Skip to content

Expand model fields only without sensitive data #496

Answered by ericingram
wpplumber asked this question in Help
Discussion options

You must be logged in to vote

@wpplumber good question. Did you try it? Can't remember if that works but it is similar to semantics for nested links

If not, you can use an include statement, for example:

const product = await swell.get(`/products/${id}`, {
  id,
  include: {
    vendor: {
      url: '/products/{id}/vendor', // note: this would be more efficient if you use the absolute vendor endpoint here instead of the nested path starting with /products/{id}
      data: {
        fields: 'first_name'
      }
    }
  }
})

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@wpplumber
Comment options

@ericingram
Comment options

@wpplumber
Comment options

Answer selected by wpplumber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
2 participants