File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ $posts = $db->table('posts')->graphqlType();
3939
4040// You can pass a new 'v1' or 'v4' parameter to uuid().
4141// This will generate a @UUID TDBM annotation that will help TDBM autogenerate the UUID
42- $posts = $db->table('posts')->string('title')->graphql () // The column is a GraphQL field
42+ $posts = $db->table('posts')->string('title')->graphqlField () // The column is a GraphQL field
4343 ->fieldName('the_title') // Let's set the name of the field to a different value
4444 ->logged() // The user must be logged to view the field
4545 ->right('CAN_EDIT') // The user must have the 'CAN_EDIT' right to view the field
4646 ->failWith(null) // If the user is not logged or has no right, let's serve 'null'
4747 ->endGraphql();
4848
49- $db->junctionTable('posts', 'users')->graphql (); // Expose the many-to-many relationship as a GraphQL field.
49+ $db->junctionTable('posts', 'users')->graphqlField (); // Expose the many-to-many relationship as a GraphQL field.
5050```
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ public function column(string $name): TdbmFluidColumn
102102 return $ this ->tdbmFluidTable ->column ($ name );
103103 }
104104
105- public function graphql (): TdbmFluidColumnGraphqlOptions
105+ public function graphqlField (): TdbmFluidColumnGraphqlOptions
106106 {
107107 $ this ->tdbmFluidTable ->graphqlType ();
108108 return new TdbmFluidColumnGraphqlOptions ($ this , $ this ->fluidColumn );
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public function __construct(TdbmFluidTable $tdbmFluidTable)
2020 $ this ->tdbmFluidTable = $ tdbmFluidTable ;
2121 }
2222
23- public function graphql (): TdbmFluidJunctionTableGraphqlOptions
23+ public function graphqlField (): TdbmFluidJunctionTableGraphqlOptions
2424 {
2525 $ this ->tdbmFluidTable ->addAnnotation ('TheCodingMachine \\GraphQLite \\Annotations \\Field ' );
2626 return new TdbmFluidJunctionTableGraphqlOptions ($ this , $ this ->tdbmFluidTable );
You can’t perform that action at this time.
0 commit comments