Skip to content

Commit 0e18f28

Browse files
authored
Merge pull request graphql#797 from moufmouf/patch-1
Adding a reference to GraphQLite PHP library
2 parents 93b723a + 689b0a8 commit 0e18f28

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

site/code/index.html.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,43 @@ class Greeting
382382
383383
Other API Platform features include data validation, authentication, authorization, deprecations, cache and GraphiQL integration.
384384
385+
#### [GraphQLite](https://graphqlite.thecodingmachine.io) ([github](https://github.com/thecodingmachine/graphqlite))
386+
387+
GraphQLite is a library that offers an annotations-based syntax for GraphQL schema definition.
388+
It is framework agnostic with bindings available for Symfony and Laravel.
389+
390+
This code declares a "product" query and a "Product" Type:
391+
392+
\`\`\`php
393+
class ProductController
394+
{
395+
/**
396+
* @Query()
397+
*/
398+
public function product(string $id): Product
399+
{
400+
// Some code that looks for a product and returns it.
401+
}
402+
}
403+
404+
/**
405+
* @Type()
406+
*/
407+
class Product
408+
{
409+
/**
410+
* @Field()
411+
*/
412+
public function getName(): string
413+
{
414+
return $this->name;
415+
}
416+
// ...
417+
}
418+
\`\`\`
419+
420+
Other GraphQLite features include validation, security, error handling, loading via data-loader pattern...
421+
385422
#### [Siler](https://siler.leocavalcante.com/graphql/) ([github](https://github.com/leocavalcante/siler))
386423
387424
Siler is a PHP library powered with high-level abstractions to work with GraphQL.

0 commit comments

Comments
 (0)