<commit_before>---
id: local-state-management
title: Local State Management
---

Relay can be used to read and write local data, and act as a single source of truth for *all* data in your client application.  
The Relay Compiler fully supports client-side extensions of the schema, which allows you to define local fields and types.  

Table of Contents:

- [Extending the client schema](#extending-the-client-schema)
- [Querying local state](#querying-local-state)<commit_msg>Update Modern-LocalStateManagement.md (#3044)<commit_after>---
id: local-state-management
title: Local State Management
---

Relay can be used to read and write local data, and act as a single source of truth for *all* data in your client application.  
The Relay Compiler fully supports client-side extensions of the schema, which allows you to define local fields and types.  

Table of Contents:

- [Extending the server schema](#extending-the-server-schema)
- [Querying local state](#querying-local-state)
{'fraction_non_alphanumeric': 0.0821501014198783, 'fraction_numerical': 0.004056795131845842, 'mean_word_length': 4.45303867403315, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1539552', 'n_tokens_mistral': 271, 'n_tokens_neox': 259, 'n_words': 123}