Skip to content

Commit 70f75f1

Browse files
unicodeveloperpeggyrayzis
authored andcommitted
Add example for SDL
1 parent b2d359b commit 70f75f1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/source/resources/graphql-glossary.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,24 @@ export const queryComponent = `const DogPhoto = ({ breed }) => (
240240
<h2 id="schema-definition-language">Schema Definition Language (SDL)</h2>
241241
<p>The syntax for writing GraphQL Schemas. It is otherwise known as Interface Definition Language. It is the lingua franca shared by all for building GraphQL APIs regardless of the programming language chosen.</p>
242242

243+
```js
244+
type Author {
245+
id: Int!
246+
firstName: String
247+
lastName: String
248+
posts: [Post]
249+
}
250+
type Post {
251+
id: Int!
252+
title: String
253+
author: Author
254+
votes: Int
255+
}
256+
type Query {
257+
posts: [Post]
258+
author(id: Int!): Author
259+
}
260+
```
243261

244262
<h2 id="schema-first-development">Schema first development</h2>
245263
<p>A [development approach](https://www.apollographql.com/docs/fundamentals/tips.html#schema) for designing and building modern UIs that involves the frontend and backend teams agreeing on a Schema first, which serves as a contract between the UI and the backend before any API engineering happens.</p>

0 commit comments

Comments
 (0)