# restrictions (/api/reference/queries/restrictions)

The workspace's do-not-contact rules, oldest first.

```graphql
restrictions(
  after: String
  before: String
  filter: RestrictionFilter
  first: Int
  last: Int
): RestrictionConnection!
```

### Arguments [#arguments]

#### [`restrictions.after`](#after) · [`String`](/api/reference/scalars/string) `scalar` [#after]
Return the rows that follow this cursor.

#### [`restrictions.before`](#before) · [`String`](/api/reference/scalars/string) `scalar` [#before]
Return the rows that come before this cursor.

#### [`restrictions.filter`](#filter) · [`RestrictionFilter`](/api/reference/inputs/restriction-filter) `input` [#filter]
Narrow the list. Left out, every rule is returned, lapsed ones included.

#### [`restrictions.first`](#first) · [`Int`](/api/reference/scalars/int) `scalar` [#first]
How many rows to return, from the start or from `after`. 50 when left out, 200 at most.

#### [`restrictions.last`](#last) · [`Int`](/api/reference/scalars/int) `scalar` [#last]
How many rows to return, counting back from the end or from `before`. 200 at most.

### Type [#type]

#### [`RestrictionConnection`](/api/reference/objects/restriction-connection) `object` [#restrictionconnection-object]
A page of do-not-contact rules.