LogoLogo
Frontend
  • Introduction
  • Getting started
  • About
  • Retrieving data
    • Introduction
    • Making a request
    • Property paths
    • Data providers
    • HTTP data provider
    • GraphQL data provider
    • Queries
    • GraphQL queries
    • Query Manager
    • Custom query classes
    • Bulk queries
  • Changing data
    • Introduction
    • Transforming and mapping data
    • Accessing properties
    • Transforming data
    • Available transformers
    • Mapping data
  • Advanced usage
    • Validation
    • Caching
    • Data History
    • Events
    • Testing API requests
Powered by GitBook
On this page
  • Changelog
  • Retrieving data
  • Changing data
  • Advanced usage

Was this helpful?

Introduction

NextGetting started

Last updated 10 months ago

Was this helpful?

A simple way to manage data retrieval from APIs and other sources. This package is built using Symfony components and can be used with any PHP application, Symfony, Laravel or plain PHP.

You can use this with the package to help you build a frontend website.

You can:

  • Read data from REST and GraphQL APIs

  • Authenticate with APIs

  • Handle errors consistently

  • Cache requests to increase performance

  • Decode data from a variety of formats (e.g. JSON, Markdown)

  • Transform data (e.g. map a category name)

  • Work out if data has changed since the last request

Changelog

All notable changes to strata/data are documented on .

Retrieving data

Strata Data has a lightweight architecture.

Data is retrieved via a . This could be a REST API, GraphQL API, or other source. Data providers wrap up data reading functionality along with support for , decoding raw data, error handling and helpers to make development easier.

Single data is returned as either an object or array.

A collection of data is returned as a collection object, containing either objects or arrays.

Changing data

Advanced usage

You use to make running a data request easier. A can be used to manage multiple queries.

Returned data can be modified via or . Transformers change data, while mappers map data to an object or array.

can be automated when you return a collection of results.

You can to check it is valid. This is useful if you need to check data before you use it (e.g. a data import).

can be used to help determine if retrieved data has changed since last access.

frontend
GitHub
Data provider
caching
queries
query manager
transformers
mappers
Pagination
validate data
Data history