# toEndpointType

FUNCTION in `@skmtc/core 0.63.4`

Determines the endpoint type based on HTTP method.

## Signature

```ts
import { toEndpointType } from '@skmtc/core'

toEndpointType(operation: OasOperation): 'query' | 'mutation'
```

## Parameters

- `operation` (OasOperation, required): The OpenAPI operation to analyze

## Examples

Example:

```ts
const getOp = new OasOperation({ method: 'get', path: '/users' });
console.log(toEndpointType(getOp)); // 'query'

const postOp = new OasOperation({ method: 'post', path: '/users' });
console.log(toEndpointType(postOp)); // 'mutation'
```

## Returns

`'query' | 'mutation'`

'query' for GET and QUERY operations, 'mutation' for all others
