---
title: args
codeStyle: true
---

## args

[GraphQL Docs on Arguments](https://graphql.org/learn/schema/#arguments)

`arg`, `intArg`, `stringArg`, `floatArg`, `idArg`, `booleanArg`

Defines an argument that can be used in any object or interface type. Args can be reused in multiple locations, and it can be convenient to create your own wrappers around arguments.

```ts
import { intArg, core } from 'nexus'

function requiredInt(opts: core.ScalarArgConfig<number>) {
  return nonNull(intArg({ ...opts }))
}
```

&nbsp;

Common options available for `arg` include the following:

&nbsp;

**Description**

The description to annotate the GraphQL SDL

Format: `description?: string;`

&nbsp;

**Default**

The default value for an argument

Example: `intArg({ default: 1 })`
