# projectResourcesDiscovery

```graphql
query ProjectResourcesDiscovery($input: ProjectResourcesInput!) {
  projectResourcesDiscovery(input: $input) {
    items {
      id
      pattern
      description
      title
      sourcePath
      editMode
    }
    diagnostics {
      kind
      sourceKind
      sourcePath
      sourceId
      code
      message
      details
    }
    errors {
      kind
      sourceKind
      sourcePath
      sourceId
      code
      message
      details
    }
  }
}
```

List project resources with diagnostics. Requires project.resources.read.

## Arguments

| Name                        | Type                   | Required | Description |
| --------------------------- | ---------------------- | -------- | ----------- |
| `input`                     | ProjectResourcesInput! | Yes      |             |
| `input.projectReference`    | String                 |          |             |
| `input.sourceTargetKind`    | String                 |          |             |
| `input.runtimeTargetKind`   | String                 |          |             |
| `input.targetEnvironmentId` | ID                     |          |             |
| `input.targetBranchId`      | ID                     |          |             |

## Variables

```json
{
  "input": {}
}
```

## Responses

| Status | Description                                                            |
| ------ | ---------------------------------------------------------------------- |
| 200    | The ProjectResourceDiscoveryResult! in data.projectResourcesDiscovery. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query ProjectResourcesDiscovery($input: ProjectResourcesInput!) {\n  projectResourcesDiscovery(input: $input) {\n    items {\n      id\n      pattern\n      description\n      title\n      sourcePath\n      editMode\n    }\n    diagnostics {\n      kind\n      sourceKind\n      sourcePath\n      sourceId\n      code\n      message\n      details\n    }\n    errors {\n      kind\n      sourceKind\n      sourcePath\n      sourceId\n      code\n      message\n      details\n    }\n  }\n}",
  "variables": {
    "input": {}
  }
}'
```

## Example response

```json
{
  "data": {
    "projectResourcesDiscovery": {
      "items": [
        {
          "id": "string",
          "pattern": "string",
          "description": "string",
          "title": "string",
          "sourcePath": "string",
          "editMode": "string"
        }
      ],
      "diagnostics": [
        {
          "kind": "string",
          "sourceKind": "string",
          "sourcePath": "string",
          "sourceId": "string",
          "code": "string",
          "message": "string",
          "details": {}
        }
      ],
      "errors": [
        {
          "kind": "string",
          "sourceKind": "string",
          "sourcePath": "string",
          "sourceId": "string",
          "code": "string",
          "message": "string",
          "details": {}
        }
      ]
    }
  }
}
```
