@@ 94-103 (lines=10) @@ | ||
91 | * @return \Youshido\GraphQL\Type\TypeInterface |
|
92 | * The type object. |
|
93 | */ |
|
94 | protected function buildFieldType(PluggableSchemaBuilderInterface $schemaBuilder, $field) { |
|
95 | $type = is_array($field) ? $field['type'] : $field; |
|
96 | return $this->parseType($type, function ($type) use ($schemaBuilder) { |
|
97 | return $schemaBuilder->findByDataTypeOrName($type, [ |
|
98 | GRAPHQL_INPUT_TYPE_PLUGIN, |
|
99 | GRAPHQL_SCALAR_PLUGIN, |
|
100 | GRAPHQL_ENUM_PLUGIN, |
|
101 | ])->getDefinition($schemaBuilder); |
|
102 | }); |
|
103 | } |
|
104 | } |
|
105 |
@@ 56-65 (lines=10) @@ | ||
53 | * @return \Youshido\GraphQL\Type\TypeInterface |
|
54 | * The type object. |
|
55 | */ |
|
56 | protected function buildArgumentType(PluggableSchemaBuilderInterface $schemaBuilder, $argument) { |
|
57 | $type = is_array($argument) ? $argument['type'] : $argument; |
|
58 | return $this->parseType($type, function ($type) use ($schemaBuilder) { |
|
59 | return $schemaBuilder->findByDataTypeOrName($type, [ |
|
60 | GRAPHQL_INPUT_TYPE_PLUGIN, |
|
61 | GRAPHQL_SCALAR_PLUGIN, |
|
62 | GRAPHQL_ENUM_PLUGIN, |
|
63 | ])->getDefinition($schemaBuilder); |
|
64 | }); |
|
65 | } |
|
66 | ||
67 | } |
|
68 |