> For the complete documentation index, see [llms.txt](https://legisratio.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legisratio.gitbook.io/docs/graphql-api/available-types.md).

# Available Types

## Type

### Law

Represents a single law, containing its metadata, such as publication details, topics, and relationships to governments and legislatures.

**Fields**

| Field Name          | Type            | Description                                                  |
| ------------------- | --------------- | ------------------------------------------------------------ |
| `idLaw`             | `ID!`           | Unique Identifier of the law.                                |
| `id`                | `ID!`           | **DEPRECATED** - USE `idLaw` INSTEAD.                        |
| `title`             | `String`        | Title assigned to the law.                                   |
| `typeLaw`           | `String`        | Type of the law, e.g., DECRETO-LEGGE, DECRETO LEGISLATIVO... |
| `publicationDate`   | `DateTimeLocal` | Publication Date of the Law.                                 |
| `inForceDate`       | `DateTimeLocal` | Date in which the law enters into force.                     |
| `department`        | `[String]`      | List of government departments involved by the law.          |
| `mainTopic`         | `[String]`      | List of main general topics regulated by the law.            |
| `numberOfCitations` | `Int`           | Number of citations in the law.                              |
| `numberOfArticles`  | `Int`           | Number of articles.                                          |
| `under_government`  | `Government`    | Each law is published under a government.                    |
| `under_legislature` | `Legislature`   | Each law is published during a legislature.                  |
| `text`              | `String`        | Full text of the law.                                        |
| `link`              | `String`        | Link of the law.                                             |

**Example**

```json
{
  "idLaw": "1990|241",
  "title": "Nuove norme in materia di procedimento amministrativo...",
  "typeLaw": "LEGGE",
  "publicationDate": "1990-08-18 00:00:00",
  "inForceDate": "1990-09-02 00:00:00",
  "department": ["Presidenza del Consiglio dei Ministri"],
  "mainTopic": ["Diritto amministrativo"],
  "numberOfCitations": 25,
  "numberOfArticles": 31,
  "under_government": { "name": "I Governo Andreotti" },
  "under_legislature": { "name": "X Legislatura" }
}
```

***

### LawUnit

Represents an elementary unit within a law (article or attachment), comprising its metadata and relevant metrics.

**Fields**

| Field Name                 | Type            | Description                                                           |
| -------------------------- | --------------- | --------------------------------------------------------------------- |
| `idArt`                    | `ID!`           | Unique identifier for articles.                                       |
| `id`                       | `ID!`           | **DEPRECATED** - USE `idArt` INSTEAD.                                 |
| `LawID`                    | `String`        | The unique identifier of the law containing the unit.                 |
| `lawtitle`                 | `String`        | The title of the law that contains the unit.                          |
| `TypeLaw`                  | `String`        | The type of the law containing the unit.                              |
| `PublicationDate`          | `DateTimeLocal` | The publication date of the law containing the unit.                  |
| `topics`                   | `[String]`      | Topics summarizing the content of the article.                        |
| `link`                     | `String`        | Link to the article.                                                  |
| `number`                   | `String`        | Number of the article.                                                |
| `title`                    | `String`        | Title of the article.                                                 |
| `text`                     | `String`        | Full text of the article.                                             |
| `lastUpdate`               | `DateTimeLocal` | Last update date of the article.                                      |
| `rankValue`                | `Float`         | A relevance score assigned by the search algorithm.                   |
| `CentralityScore`          | `Float`         | A score indicating the article's importance within the legal network. |
| `_Words`                   | `Int`           | Number of words in the article's text corpus.                         |
| `_WordsNoStopWords`        | `Int`           | Number of words excluding stopwords.                                  |
| `_Gerunds`                 | `Int`           | Count of gerunds used in the article.                                 |
| `_ModalVerbs`              | `Int`           | Number of modal verbs.                                                |
| `_Pronouns`                | `Int`           | Count of pronouns.                                                    |
| `_Adjectives`              | `Int`           | Number of adjectives.                                                 |
| `_CommonWords`             | `Float`         | Frequency count of the most common words.                             |
| `_AverageWordsLength`      | `Float`         | Average length of words (in characters).                              |
| `_Sentences`               | `Int`           | Number of sentences.                                                  |
| `_AverageSentenceLength`   | `Float`         | Average number of words per sentence.                                 |
| `_GulpeaseIndex`           | `Float`         | Gulpease Index (readability score for Italian).                       |
| `_FleschReadingEase`       | `Float`         | Flesch Reading Ease score.                                            |
| `_CenteredRelativeClauses` | `Float`         | Average number of relative propositions.                              |

**Example**

```json
{
  "idArt": "1990|241#1",
  "lawtitle": "Legge 241/1990",
  "title": "Principi generali dell'attività amministrativa",
  "text": "L'attività amministrativa persegue i fini determinati dalla legge...",
  "_Words": 150,
  "_GulpeaseIndex": 45.2
}
```

***

### Act

Represents a secondary act, including its ID, title, full text, publication date, and associated entity.

**Fields**

| Field Name        | Type            | Description                                     |
| ----------------- | --------------- | ----------------------------------------------- |
| `idAct`           | `String`        | Unique identifier for the act.                  |
| `title`           | `String`        | Title of the act.                               |
| `text`            | `String`        | Full text of the act.                           |
| `publicationDate` | `DateTimeLocal` | Date of publication.                            |
| `entity`          | `String`        | Issuing entity (e.g., Bankitalia, IVASS, CCNL). |
| `url`             | `String`        | URL to the official source.                     |

***

### Judgment

Represents a judgment document.

**Fields**

| Field Name        | Type            | Description                                        |
| ----------------- | --------------- | -------------------------------------------------- |
| `idJudgment`      | `String`        | The unique identifier of the judgment.             |
| `documentType`    | `String`        | Type of judgment (e.g., SENTENZA).                 |
| `title`           | `String`        | Title of the judgment.                             |
| `number`          | `String`        | Alphanumeric, yearly based ID of judgment.         |
| `publicationDate` | `DateTimeLocal` | The date when the judgment was published.          |
| `text`            | `String`        | The full text of the judgment.                     |
| `court`           | `String`        | Court that published the judgment.                 |
| `section`         | `String`        | Court section, if available.                       |
| `massima`         | `String`        | Massima either generated or available from source. |
| `url`             | `String`        | URL to the original source, if available.          |
| `criteria`        | `String`        | Strategy used to get a relevant judgment.          |
| `location`        | `String`        | Location of the court, if available.               |

***

### DDL

Represents a Disegno di Legge (Legislative Bill).

**Fields**

| Field Name         | Type          | Description                                      |
| ------------------ | ------------- | ------------------------------------------------ |
| `id`               | `ID!`         | Internal system identifier.                      |
| `branch`           | `String`      | The branch of parliament (e.g., Camera, Senato). |
| `title`            | `String`      | The title of the legislative proposal.           |
| `status`           | `String`      | Current status of the bill.                      |
| `presentationdate` | `String`      | The date the bill was presented.                 |
| `phasenumber`      | `String`      | Current phase number in the legislative process. |
| `nature`           | `String`      | The nature or category of the DDL.               |
| `ddlurl`           | `String`      | URL to the DDL documentation.                    |
| `cameraattouri`    | `String`      | URI for the specific parliamentary act.          |
| `text`             | `String`      | The full text or description of the bill.        |
| `amendments`       | `[Amendment]` | List of associated amendments.                   |

***

### Amendment

Represents an amendment to a DDL.

**Fields**

| Field Name         | Type          | Description                                          |
| ------------------ | ------------- | ---------------------------------------------------- |
| `id`               | `ID`          | ID of the amendment.                                 |
| `number`           | `String`      | Number of the amendment.                             |
| `presentationdate` | `String`      | Presentation date.                                   |
| `text`             | `String`      | Text of the amendment.                               |
| `childAmendments`  | `[Amendment]` | List of amendments proposed to this amendment.       |
| `parentAmendment`  | `Amendment`   | The original amendment this one is trying to change. |

***

### Government

Represents a specific government cabinet.

**Fields**

| Field Name  | Type             | Description                           |
| ----------- | ---------------- | ------------------------------------- |
| `name`      | `ID!`            | Unique identifier for the government. |
| `startDate` | `DateTimeLocal!` | Start date of the government's term.  |
| `endDate`   | `DateTimeLocal!` | End date of the government's term.    |

***

### Legislature

Represents a specific parliamentary legislature.

**Fields**

| Field Name  | Type             | Description                            |
| ----------- | ---------------- | -------------------------------------- |
| `name`      | `ID!`            | Unique identifier for the legislature. |
| `startDate` | `DateTimeLocal!` | Start date of the legislature's term.  |
| `endDate`   | `DateTimeLocal!` | End date of the legislature's term.    |

***

### LawMetrics

A collection of aggregated or individual linguistic and structural metrics for a set of laws.

**Fields**

| Field Name                 | Type     | Description                              |
| -------------------------- | -------- | ---------------------------------------- |
| `Year`                     | `String` | Year of publication.                     |
| `N`                        | `Int`    | Count of laws.                           |
| `_Words`                   | `Int`    | Number of words.                         |
| `_WordsNoStopWords`        | `Int`    | Number of words excluding stopwords.     |
| `_Gerunds`                 | `Int`    | Count of gerunds.                        |
| `_ModalVerbs`              | `Int`    | Number of modal verbs.                   |
| `_Pronouns`                | `Int`    | Count of pronouns.                       |
| `_Adjectives`              | `Int`    | Number of adjectives.                    |
| `_CommonWords`             | `Float`  | Frequency count of common words.         |
| `_Characters`              | `Int`    | Number of characters.                    |
| `_AverageWordsLength`      | `Float`  | Average length of words.                 |
| `_Sentences`               | `Int`    | Number of sentences.                     |
| `_AverageSentenceLength`   | `Float`  | Average number of words per sentence.    |
| `_GulpeaseIndex`           | `Float`  | Gulpease Index.                          |
| `_FleschReadingEase`       | `Float`  | Flesch Reading Ease score.               |
| `_CenteredRelativeClauses` | `Float`  | Average number of relative propositions. |

***

### LawEdge

Represents a relationship between two laws (amendment or repeal).

**Fields**

| Field Name         | Type      | Description                           |
| ------------------ | --------- | ------------------------------------- |
| `IDSourceLaw`      | `String!` | ID of the law that orders the change. |
| `YearSource`       | `Int!`    | Year of the source law.               |
| `IDDestinationLaw` | `String!` | ID of the law being changed.          |
| `YearDestination`  | `Int!`    | Year of the destination law.          |

***

### ParagraphOfLaw

Search the relevant chunk of a long law.

**Fields**

| Field Name | Type     | Description                       |
| ---------- | -------- | --------------------------------- |
| `id`       | `String` | The unique identifier of the law. |
| `title`    | `String` | Title of the article.             |
| `text`     | `String` | Text of the chunk.                |

***

### TextChanges

Represents amending/repealing texts for an article.

**Fields**

| Field Name     | Type     | Description                          |
| -------------- | -------- | ------------------------------------ |
| `idLawChange`  | `String` | ID of the changing law.              |
| `changedAt`    | `String` | Date of change.                      |
| `text`         | `String` | Original text.                       |
| `changingText` | `String` | The text that introduces the change. |

***

## Input Field

### AggregationLawFilter

Defines filters for aggregating law metrics.

| Field Name | Type      | Description                       |
| ---------- | --------- | --------------------------------- |
| `year_gt`  | `Int`     | Filter for laws after this year.  |
| `year_lt`  | `Int`     | Filter for laws before this year. |
| `gov_name` | `String`  | Filter by government name.        |
| `leg_name` | `String`  | Filter by legislature name.       |
| `levels`   | `[Level]` | Level to be selected for search.  |

***

### LawFilter

Defines filters for retrieving specific laws.

| Field Name               | Type                | Description                      |
| ------------------------ | ------------------- | -------------------------------- |
| `id_EQ`                  | `String`            | Exact match on ID.               |
| `gov_EQ`                 | `String`            | Exact match on government name.  |
| `leg_EQ`                 | `String`            | Exact match on legislature name. |
| `title_CONTAINS`         | `String`            | Case-insensitive title search.   |
| `typeLaw`                | `String`            | Filter by law type.              |
| `department_INCLUDES`    | `[String!]`         | Filter by department.            |
| `under_government_SOME`  | `GovernmentFilter`  | Filter by government criteria.   |
| `under_legislature_SOME` | `LegislatureFilter` | Filter by legislature criteria.  |
| `year_gt`                | `Int`               | Filter by year (after).          |
| `year_lt`                | `Int`               | Filter by year (before).         |
| `idLaw_in`               | `[String]`          | Filter by specific law IDs.      |

***

### LawMetricsFilter

Filters for querying law metrics.

| Field Name        | Type       | Description                            |
| ----------------- | ---------- | -------------------------------------- |
| `getDistribution` | `Boolean`  | Return individual data points if true. |
| `idLaw_in`        | `String`   | Comma-separated law IDs.               |
| `gov_name`        | `String`   | Filter by government name.             |
| `leg_name`        | `String`   | Filter by legislature name.            |
| `year_gt`         | `Int`      | Filter by year (after).                |
| `year_lt`         | `Int`      | Filter by year (before).               |
| `domains`         | `[String]` | Filter by department.                  |
| `topics`          | `[String]` | Filter by topics.                      |
| `lawType`         | `String`   | Filter by law type.                    |
| `levels`          | `[Level]`  | Level to be selected for search.       |

***

## Enum

### Level

Level to be selected for search (e.g., `EU`, `National`, `RegionalLazio`, etc.).

### Section

Court section filter (e.g., `CASSAZIONE_CIVILE`, `CONSIGLIO_DI_STATO`, `TAR_LAZIO`, etc.).

### Entity

Authority or institution issuing secondary legislation (e.g., `Bankitalia`, `IVASS`, `CCNL`).

### Effort

Effort level for search (`LOW`, `HIGH`).

***

## Scalar

### DateTimeLocal

A date-time string in the format 'YYYY-MM-DD HH:flag\_mm:ss', without time-zone information.
