Skip to content

Commit

Permalink
Book pages
Browse files Browse the repository at this point in the history
  • Loading branch information
paf31 committed Feb 2, 2024
1 parent bd3d512 commit 08b32fc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion specification/src/tutorial/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ We define two scalar types: `String` and `Int`.

## Object Types

For each collection, we define an object type for its rows:
For each collection, we define an object type for its rows. In addition, we define object types for any nested types which we use:

```rust,no_run,noplayground
{{#include ../../../ndc-reference/bin/reference/main.rs:schema_object_types}}
Expand All @@ -38,6 +38,12 @@ For each collection, we define an object type for its rows:
{{#include ../../../ndc-reference/bin/reference/main.rs:schema_object_type_article}}
```

### Institution

```rust,no_run,noplayground
{{#include ../../../ndc-reference/bin/reference/main.rs:schema_object_type_institution}}
```

## Collections

We define each collection's schema using the type information defined above:
Expand Down Expand Up @@ -66,6 +72,12 @@ We define one additional collection, `articles_by_author`, which is provided as
{{#include ../../../ndc-reference/bin/reference/main.rs:schema_collection_articles_by_author}}
```

### Institution

```rust,no_run,noplayground
{{#include ../../../ndc-reference/bin/reference/main.rs:schema_collection_institution}}
```

## Functions

The schema defines a list of [functions](../specification/schema/functions.md), each including its input and output [types](../specification/types.md).
Expand Down

0 comments on commit 08b32fc

Please sign in to comment.