---
title: Comprendre le dossier viewsConfig
slug: oip-next/h78dil3owdxk9moqviy2d
description: Learn how to configure views in the `viewsConfig` folder by using YAML files. These files offer essential settings for generating views, such as view ID, pathname, directory, actions, and GraphQL queries/mutations. Check out the provided example configura
icon: {"lucideIcon":"📘"}
createdAt: 2023-08-17T13:02:31.000Z
---

Le dossier `viewsConfig` contient les fichiers YAML des configurations des views. Ces fichiers sont consommés lors de&#x20;la génération des views.

Exemple d'un fichier de configuration :

```yaml
home:
  viewId: HOME
  pathname: /
  directory: home
  actions:
    - NEXT
    - _DEFAULT_

  # layer graphql  
  graphql:
    # queries section
    queries:
      # get project
      - type: Project
        fields:
          id: String
          externalId: String
          name: String
        resolver: getProject
      # get customer  
      - type: Customer
        fields:
          email: String
          firstName: String
          lastName: String
        resolver: getCustomer
    
    # mutations section
    mutations:
      # create customer
      - type: Customer
        inputs:
          email: String
          firstName: String
          lastName: String
        resolver: createCustomer
```
