question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to exclude certain fields from a `getEntries` call?

See original GitHub issue
  • Node Version: v7.7.2
  • Npm Version: 4.4.4
  • Platform: macOS Sierra
  • Package Version: 4.1.2

If I have a list of articles, is it possible to exclude the article body from a client.getEntries call? I would like to do this to speed up the response from the call when listing all the articles. Does that make sense?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
coleturnercommented, May 31, 2020

Hello 👋

I found this thread while trying to find documentation on the select operator. I’m wondering if there is an invert/negate operation for select, similar to ‘-’ for ordering. The reason why is I’m trying to select all fields except one or two.

4reactions
Khaledgarbayacommented, Mar 31, 2017

Hi @mrmartineau Yes you can do that using the select operator.

client.getEntries({content_tytpe: 'myContentTypeId', select: 'fields.fieldName, fields.fieldName2'})

For more infos on that check the API documentation. One limitation when using the SDK the sys property will be appended always since it is needed fo the link resolution. Hint: we added SDK snippets in the documentation, so can copy paste code and run it very easily just click on the drop down and choose Javascript.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Content Delivery API | Contentful
Exclusion. You can filter a field by multiple values with the [nin] operator. When applied to an array value there must be at...
Read more >
How to exclude certain fields from .search()
Starting with Craft 3.1 the solution is easy. In the field definition there is a new checkbox: "Use this field's value as search...
Read more >
How to exclude one particular field from a collection in ...
Use query.select for field selection in the current (3.x) Mongoose builds. Prefix a field name you want to exclude with a - ;...
Read more >
Content Delivery API Docs - Contentstack
This call returns information of a specific content type. It returns the content type schema, but does not include its entries. Global Fields....
Read more >
Include or Exclude Specific Fields in a Provider Search
Description: The Providers Search endpoint supports the fields and _excl_fields query parameters to limit what fields are included on Provider objects ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found