# CacheByOptions.fieldsArg property · @imqueue/pg-cache

Source: https://imqueue.org/api/pg-cache/latest/pg-cache.cachebyoptions.fieldsarg/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-cache 5.0.6 — generated reference, not hand-written

Zero-index based position of fields argument in a method arguments, which are passed at runtime. Fields argument are usually passed from a client to specify a query map to be extracted and returned from a service method. For example, fields map can be built from an incoming GraphQL request using fieldsMap() function from graphql-fields-list package.

Usually pg-based `@imqueue` services, which utilize `@imqueue/pg-sequelize` package passing fields as a second argument to service methods, so if this option is omitted, it will try to check for the second passed argument. If you need to explicitly disable it, pass -1.

**Signature:**

```typescript
fieldsArg?: number;
```

