Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Annotation/AbstractGraphQLControl.php
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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem ;)

*/

namespace Overblog\GraphQLBundle\Annotation;

/**
* Annotation for graphql control
*
* @Annotation
* @Target("PROPERTY")
*/
abstract class AbstractGraphQLControl
{
/**
* Access control access name
*
* @var string
*/
public $method;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please give some more ❤️ to PHP CS 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, bad configuration of my new computer :)

30 changes: 30 additions & 0 deletions Annotation/AbstractGraphQLRelation.php
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;
}
17 changes: 17 additions & 0 deletions Annotation/GraphQLAccessControl.php
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
{
}
24 changes: 24 additions & 0 deletions Annotation/GraphQLAlias.php
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;
}
19 changes: 19 additions & 0 deletions Annotation/GraphQLAnnotation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

The 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';
31 changes: 31 additions & 0 deletions Annotation/GraphQLColumn.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;
}
29 changes: 29 additions & 0 deletions Annotation/GraphQLConnectionFields.php
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;
}
24 changes: 24 additions & 0 deletions Annotation/GraphQLDescription.php
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;
}
29 changes: 29 additions & 0 deletions Annotation/GraphQLEdgeFields.php
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;
}
37 changes: 37 additions & 0 deletions Annotation/GraphQLInputArgs.php
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;
}
27 changes: 27 additions & 0 deletions Annotation/GraphQLMutation.php
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;
}
29 changes: 29 additions & 0 deletions Annotation/GraphQLNode.php
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;
}
17 changes: 17 additions & 0 deletions Annotation/GraphQLPublicControl.php
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
{
}
Loading