Skip to content

Playground file structure

Moritz Lang edited this page Nov 23, 2018 · 7 revisions

.ocelotplayground πŸ“¦

The main files you work with are called Playgrounds. A Playground is a package file, which basically means that it is a folder presented as if it were a single file. This has the benefit that we can deliver both contents and config in one, human-readable, bundle. In detail this will look as follows:

Example.ocelotplayground
contents.graphql settings.json

contents.graphql πŸ“„

This file is a normal GraphQL file which can easily be used outside the containing Playground. It contains the actual contents the user enters within the editor.

settings.json πŸ“„

As its name suggests this file is used to store all Playground settings. The following snippet shows the default settings.json.

{
  "endpoint": null,
  "public_headers": {
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "secret_headers": {}
}

Because we want to keep security in mind we differentiate between public and secret headers. The values of public headers will directly be stored as plain-text inside the file. Values of secret headers, on the other hand, are safely stored in the iOS keychain.

Clone this wiki locally