@@ -9,251 +9,26 @@ export default {
99 options : {
1010 siteRoot : `/docs` ,
1111 appTitle : 'LDOG Stack' ,
12+ appFavicon : 'https://apiskeletons.com/images/favicon.ico' ,
1213 appLogo : 'https://raw.githubusercontent.com/API-Skeletons/ldog/main/public/ldog.svg' ,
13- appFavicon : 'https://apiskeletons.com/images/favicon.ico' ,
14+ siteMeta : {
15+ description :
16+ 'A PHP Stack with Laravel, Doctrine ORM, and GraphQL.' ,
17+ 'og:description' :
18+ 'A PHP Stack with Laravel, Doctrine ORM, and GraphQL.' ,
19+ keywords :
20+ 'laravel,doctrine,orm,graphql' ,
21+ author : 'API Skeletons, Inc. <contact@apiskeletons.com>' ,
22+ 'og:title' : 'LDOG Stack' ,
23+ 'og:type' : 'article' ,
24+ 'og:image' :
25+ 'https://raw.githubusercontent.com/API-Skeletons/ldog/main/public/ldog.svg' ,
26+ } ,
1427 pages : [
1528 {
16- title : 'Welcome ' ,
29+ title : 'GraphQL API Docs ' ,
1730 content : `
18- LDOG Stack
19- ==========
20-
21- Laravel, Doctrine ORM, and GraphQL
22- ----------------------------------
23-
24- This is a template application for building GraphQL applications in
25- Laravel with Doctrine ORM. **Known as the LDOG (el-dog) Stack.**
26-
27- To create a new project run
28- \`\`\`
29- composer create-project api-skeletons/ldog
30- \`\`\`
31-
32- Source code available at https://github.com/api-skeletons/ldog
33-
34- This site is the ldog project running on Google Cloud. It includes an example
35- Doctrine ORM schema and database served as GraphQL.
36-
37- You may explore the GraphQL with [graphiql](https://ldog.apiskeletons.dev/graphiql)
38- or POST to this server's GraphQL endpoint at https://ldog.apisketons.dev
39-
40-
41- Features
42- --------
43-
44- * Dockerfile suitable to immediate deployment to Cloud Run
45- * docker-compose.yml file - no Laravel Sail integration
46- * Doctrine ORM configured for XML metadata and no database naming strategy
47- * Includes the [doctrine-orm-graphql](https://github.com/api-skeletons/doctrine-orm-graphql)
48- type driver
49- * The [GraphQLController](https://github.com/API-Skeletons/ldog/blob/main/app/Http/Controllers/GraphQLController.php)
50- is pre-configured with example endpoints for connection, entity, and mutation
51- * The Doctrine [entities](https://github.com/API-Skeletons/ldog/blob/main/app/Doctrine/ORM/Entity/Artist.php)
52- have default configuration for doctrine-orm-graphql.
53- * The Laravel code has been modified so the entire project passes the
54- [Doctrine Coding Standard](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/11.0/reference/index.html)
55- * Code quality tools include parallel-lint, phpcs, psalm, and phpunit
56- * An unit test is included that tests the GraphQL endpoints
57-
58-
59- Why use this template application?
60- ----------------------------------
61-
62- This template application is based on Laravel 10.x. Nothing has been taken away from that
63- default Laravel release but a lot has been added.
64-
65- There are many GraphQL solutions available including those that integrate with Laravel
66- and Eloquent. But Doctrine ORM is the superior ORM because it is a
67- [data mapper pattern](https://www.thoughtfulcode.com/orm-active-record-vs-data-mapper/).
68-
69- The [doctrine-orm-graphql](https://github.com/api-skeletons/doctrine-orm-graphql) library
70- creates the types for your Doctrine entities and has numerous other features.
71-
72- A [Skipper](https://skipper18.com) diagram is included and the example database metadata
73- is exported from it as XML. Tha advantages of XML metadata over annotations or attributes
74- are many and not needing to edit the XML manually is a big benefit.
75-
76-
77- Convert an existing database to GraphQL
78- ---------------------------------------
79-
80- Using skipper, import a new external model and import your database. Change the
81- Export Data Format to XML and set the path to \`~/config/doctrine-orm-metadata\`.
82- Export from Skipper and build your entities. Turn on \`globalEnable\` in the driver
83- and create at least one endpoint.
84-
85-
86- Support
87- -------
88-
89- Support for this template application is available through
90- [API Skeletons](mailto:contact@apiskeletons.com).
91-
92-
93- ---
94-
95- A project of [API Skeletons](mailto:contact@apiskeletons.com)
96- * https://github.com/api-skeletons/ldog
97- `
98- } ,
99- {
100- title : 'Getting Started' ,
101- content : `
102- Getting Started
103- ===============
104-
105- * Copy \`.env.example\` or \`.env.dev\` to \`.env\`
106- * Run \`docker-compose up -d\`
107- * Connect to the docker instance by running \`docker ps\` to get the instance id,
108- then \`docker exec -it {instanceId} bash\`
109- * Run \`composer install\`
110- * Create the database with \`php artisan doctrine:schema:create\`
111- * Generate the GraphQL documentation with \`magidoc generate\`
112-
113- ---
114-
115- A project of [API Skeletons](mailto:contact@apiskeletons.com)
116- * https://github.com/api-skeletons/ldog
117- `
118- } ,
119- {
120- title : 'Doctrine ERD with Skipper' ,
121- content : `
122- Doctrine ERD with Skipper
123- =========================
124-
125- Included is an ERD you can use to extend your project's database. The ERD is created with [Skipper](https://skipper18.com).
126- Find it at \`~/ldog.skipper\`. The export path is set to \`~/config/doctrine-orm-metadata\`.
127-
128- This an an immensely powerful tool and every Doctrine ORM project should use it.
129-
130- This is the ERD for the entities used in developing the stack.
131-
132- <img
133- src="https://raw.githubusercontent.com/API-Skeletons/ldog/main/public/erd.png"
134- title="ERD"
135- alt="ERD"
136- />
137-
138- ---
139-
140- A project of [API Skeletons](mailto:contact@apiskeletons.com)
141- * https://github.com/api-skeletons/ldog
142- `
143- } ,
144- {
145- title : 'GraphQL Documentation' ,
146- content : `
147- GraphQL Documentation
148- =====================
149-
150- GraphQL documentation is created with \`magidoc\`. Inside the container and from the root of the project,
151- \`/var/www\`, run \`magidoc generate\` to create the documentation.
152-
153- Configuration is done via the \`~/magidoc.mjs\` file.
154-
155- ---
156-
157- A project of [API Skeletons](mailto:contact@apiskeletons.com)
158- * https://github.com/api-skeletons/ldog
159- `
160- } ,
161- {
162- title : 'Code Quality Tools' ,
163- content : `
164- Code Quality
165- ------------
166-
167- To ensure code quality, run \`composer test\` to run the following:
168-
169- * [Parallel Lint](https://github.com/php-parallel-lint/PHP-Parallel-Lint)
170- * [Doctrine Coding Standard](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/11.0/reference/index.html)
171- * [Psalm](https://psalm.dev/docs/)
172- * [PHPUnit](https://docs.phpunit.de/en/10.5/)
173-
174- ---
175-
176- A project of [API Skeletons](mailto:contact@apiskeletons.com)
177- * https://github.com/api-skeletons/ldog
178- `
179- } ,
180- {
181- title : 'Fixtures' ,
182- content : `
183- Fixtures
184- --------
185-
186- Included with LDOG is a Doctrine fixture library. There are two included fixtures. To rebuild the
187- SQLite database, copy \`.env.dev\` to \`.env\`, delete the \`~/database/database.sqlite\` file, and run
188-
189- \`\`\`
190- rm database/database.sqlite
191- php artisan doctrine:schema:create
192- php artisan doctrine:data-fixture:import faker
193- \`\`\`
194-
195- ---
196-
197- A project of [API Skeletons](mailto:contact@apiskeletons.com)
198- * https://github.com/api-skeletons/ldog
199- `
200- } ,
201- {
202- title : 'Help Resources' ,
203- content : `
204- Help Resources
205- --------------
206-
207- * Laravel - https://laravel.com/docs/10.x
208- * Doctrine - https://www.doctrine-project.org/projects/doctrine-orm/en/2.10/index.html
209- * Laravel Doctrine Adapter - https://www.laraveldoctrine.org/
210- * GraphQL Documentation - https://graphql.org/learn/
211- * GraphQL-php - https://webonyx.github.io/graphql-php/
212- * GraphQL Type Driver for Doctrine ORM - https://doctrine-orm-graphql.apiskeletons.dev/en/latest/
213- * Skipper - https://www.skipper18.com/help/
214- * magidoc - https://magidoc.js.org/introduction/welcome
215- * migrations - https://laraveldoctrine.org/docs/1.8/migrations
216- * data fixtures - https://github.com/API-Skeletons/laravel-doctrine-data-fixtures/blob/main/README.md
217-
218- ---
219-
220- A project of [API Skeletons](mailto:contact@apiskeletons.com)
221- * https://github.com/api-skeletons/ldog
222- `
223- } ,
224- {
225- title : 'License' ,
226- content : `
227- \`\`\`
228- The MIT License (MIT)
229-
230- Copyright (c) 2024 API Skeletons, Inc. <contact@apiskeletons.com>
231- Copyright (c) Taylor Otwell
232-
233- Permission is hereby granted, free of charge, to any person obtaining a copy
234- of this software and associated documentation files (the "Software"), to deal
235- in the Software without restriction, including without limitation the rights
236- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
237- copies of the Software, and to permit persons to whom the Software is
238- furnished to do so, subject to the following conditions:
239-
240- The above copyright notice and this permission notice shall be included in all
241- copies or substantial portions of the Software.
242-
243- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
244- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
245- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
246- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
247- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
248- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
249- SOFTWARE.
250- \`\`\`
251- `
252- } , {
253- title : 'Example Query' ,
254- content : `
255- Example Query
256- =============
31+ # GraphQL API Docs
25732
25833This query returns all Artists, Performances, and Recordings in the included sample database.
25934
0 commit comments