# opportunities (/api/reference/queries/opportunities)

The workspace's opportunities, oldest first.

```graphql
opportunities(
  after: String
  before: String
  filter: OpportunityFilter
  first: Int
  last: Int
): OpportunityConnection!
```

### Arguments [#arguments]

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

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

#### [`opportunities.filter`](#filter) · [`OpportunityFilter`](/api/reference/inputs/opportunity-filter) `input` [#filter]
Narrow the list. Left out, every opportunity is returned, closed and lost ones included.

#### [`opportunities.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.

#### [`opportunities.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]

#### [`OpportunityConnection`](/api/reference/objects/opportunity-connection) `object` [#opportunityconnection-object]
A page of opportunities.