@@ -40,7 +40,7 @@ If not specified, it uses `FieldDefinition`.
4040
4141Compiler pass example that should be placed in ` src/DependencyInjection/Compiler ` :
4242
43- ``` php
43+ ``` php skip-validation
4444[[= include_file('code_samples/api/graphql/src/DependencyInjection/Compiler/MyCustomTypeGraphQLCompilerPass.php') =]]
4545```
4646
@@ -60,7 +60,8 @@ It requires that you implement the `getFieldTypeIdentifier` method to tell which
6060Add ` MyFieldDefinitionMapper.php ` mapper to ` src/GraphQL/Schema ` :
6161
6262``` php
63- [[= include_file('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 0, 16) =]][[= include_file('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 36, 37) =]]
63+ [[= include_code('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 1, 17) =]]
64+ [[= include_code('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 38, 39) =]]
6465```
6566
6667The ` FieldDefinitionMapper ` interface defines following methods:
@@ -75,7 +76,7 @@ When a mapper method is decorated, you need to call the decorated service method
7576To do that, you need to replace ` mapXXX ` by the method it's in:
7677
7778``` php
78- [[= include_file ('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 19, 22 , remove_indent=True) =]]
79+ [[= include_code ('code_samples/api/graphql/src/GraphQL/Schema/MyFieldDefinitionMapper.php', 21, 24 , remove_indent=True) =]]
7980```
8081
8182It's required for every implemented method, so that other mappers are called for the other field types.
0 commit comments