# GraphQL error: Argument "limit" has invalid value: expected type "Int!" but got "String"

- **ID:** `api/graphql-field-argument-type-mismatch`
- **Domain:** api
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The client sent a GraphQL query or mutation with an argument value of the wrong type (e.g., string instead of integer).

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| GraphQL June 2018 | active | — | — |
| Apollo Server v4 | active | — | — |
| graphql-js v16 | active | — | — |

## Workarounds

1. **Ensure the client sends the correct type: for integers, avoid quoting (e.g., `{ "query": "query { items(limit: 10) { id } }" }`).** (95% success)
   ```
   Ensure the client sends the correct type: for integers, avoid quoting (e.g., `{ "query": "query { items(limit: 10) { id } }" }`).
   ```
2. **Use a variable with a proper type definition: `query($limit: Int!) { items(limit: $limit) { id } }` and pass `{"limit": 10}` in the variables.** (90% success)
   ```
   Use a variable with a proper type definition: `query($limit: Int!) { items(limit: $limit) { id } }` and pass `{"limit": 10}` in the variables.
   ```

## Dead Ends

- **** — GraphQL strict typing rejects mismatched types unless coercion is explicitly defined. (90% fail)
- **** — Clients unaware of the custom scalar may still send strings. (60% fail)
