-
Couldn't load subscription status.
- Fork 223
WIP: Add annotation parser #353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql control | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| abstract class AbstractGraphQLControl | ||
| { | ||
| /** | ||
| * Access control access name | ||
| * | ||
| * @var string | ||
| */ | ||
| public $method; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please give some more ❤️ to PHP CS 😆 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Of course, bad configuration of my new computer :) |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type relation | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| abstract class AbstractGraphQLRelation | ||
| { | ||
| /** | ||
| * Type | ||
| * | ||
| * @var string | ||
| */ | ||
| public $target; | ||
|
|
||
| /** | ||
| * Is nullable? | ||
| * | ||
| * @var bool | ||
| */ | ||
| public $nullable; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql access control | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| final class GraphQLAccessControl extends AbstractGraphQLControl | ||
| { | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type | ||
| * Use it if you don't use Doctrine ORM annotation | ||
| * | ||
| * @Annotation | ||
| * @Target("CLASS") | ||
| */ | ||
| final class GraphQLAlias | ||
| { | ||
| /** | ||
| * Type | ||
| * | ||
| * @var string | ||
| */ | ||
| public $name; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <?php | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the need of this file? |
||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| require_once __DIR__.'/GraphQLAccessControl.php'; | ||
| require_once __DIR__.'/GraphQLAlias.php'; | ||
| require_once __DIR__.'/GraphQLColumn.php'; | ||
| require_once __DIR__.'/GraphQLDescription.php'; | ||
| require_once __DIR__.'/GraphQLInputArgs.php'; | ||
| require_once __DIR__.'/GraphQLMutation.php'; | ||
| require_once __DIR__.'/GraphQLPublicControl.php'; | ||
| require_once __DIR__.'/GraphQLQuery.php'; | ||
| require_once __DIR__.'/GraphQLRelayMutation.php'; | ||
| require_once __DIR__.'/GraphQLResolver.php'; | ||
| require_once __DIR__.'/GraphQLToMany.php'; | ||
| require_once __DIR__.'/GraphQLToOne.php'; | ||
| require_once __DIR__.'/GraphQLType.php'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type | ||
| * Use it if you don't use Doctrine ORM annotation | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| final class GraphQLColumn | ||
| { | ||
| /** | ||
| * Type | ||
| * | ||
| * @var string | ||
| */ | ||
| public $type; | ||
|
|
||
| /** | ||
| * Is nullable? | ||
| * | ||
| * @var bool | ||
| */ | ||
| public $nullable; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type | ||
| * Use it if you don't use Doctrine ORM annotation | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| final class GraphQLConnectionFields | ||
| { | ||
| /** | ||
| * Type | ||
| * | ||
| * @var string | ||
| */ | ||
| public $type; | ||
|
|
||
| /** | ||
| * @var string | ||
| */ | ||
| public $resolve; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type | ||
| * Use it if you don't use Doctrine ORM annotation | ||
| * | ||
| * @Annotation | ||
| * @Target({"CLASS", "PROPERTY"}) | ||
| */ | ||
| final class GraphQLDescription | ||
| { | ||
| /** | ||
| * Type | ||
| * | ||
| * @var string | ||
| */ | ||
| public $description; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type | ||
| * Use it if you don't use Doctrine ORM annotation | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| final class GraphQLEdgeFields | ||
| { | ||
| /** | ||
| * Type | ||
| * | ||
| * @var string | ||
| */ | ||
| public $type; | ||
|
|
||
| /** | ||
| * @var string | ||
| */ | ||
| public $resolve; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type | ||
| * Use it if you don't use Doctrine ORM annotation | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| class GraphQLInputArgs | ||
| { | ||
| /** | ||
| * @var string | ||
| */ | ||
| public $name; | ||
|
|
||
| /** | ||
| * @var string | ||
| */ | ||
| public $target; | ||
|
|
||
| /** | ||
| * @var string | ||
| */ | ||
| public $type; | ||
|
|
||
| /** | ||
| * @var string | ||
| */ | ||
| public $description; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type | ||
| * Use it if you don't use Doctrine ORM annotation | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| class GraphQLMutation | ||
| { | ||
| /** | ||
| * @var string | ||
| */ | ||
| public $method; | ||
|
|
||
| /** | ||
| * @var array | ||
| */ | ||
| public $args; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql type | ||
| * Use it if you don't use Doctrine ORM annotation | ||
| * | ||
| * @Annotation | ||
| * @Target("CLASS") | ||
| */ | ||
| final class GraphQLNode | ||
| { | ||
| /** | ||
| * Type | ||
| * | ||
| * @var string | ||
| */ | ||
| public $type; | ||
|
|
||
| /** | ||
| * @var string | ||
| */ | ||
| public $resolve; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?php | ||
| /** | ||
| * @author Thibault Colette <thibaultcolette06@hotmail.fr> | ||
| * @copyright 2018 Thibault Colette | ||
| */ | ||
|
|
||
| namespace Overblog\GraphQLBundle\Annotation; | ||
|
|
||
| /** | ||
| * Annotation for graphql access control | ||
| * | ||
| * @Annotation | ||
| * @Target("PROPERTY") | ||
| */ | ||
| final class GraphQLPublicControl extends AbstractGraphQLControl | ||
| { | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please remove the copyright statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem ;)