@@ 87-96 (lines=10) @@ | ||
84 | * @return \Youshido\GraphQL\Type\TypeInterface |
|
85 | * The type object. |
|
86 | */ |
|
87 | protected function buildFieldType(PluggableSchemaBuilderInterface $schemaBuilder, $field) { |
|
88 | $type = is_array($field) ? $field['type'] : $field; |
|
89 | return $this->parseType($type, function ($type) use ($schemaBuilder) { |
|
90 | return $schemaBuilder->findByDataTypeOrName($type, [ |
|
91 | GRAPHQL_INPUT_TYPE_PLUGIN, |
|
92 | GRAPHQL_SCALAR_PLUGIN, |
|
93 | GRAPHQL_ENUM_PLUGIN, |
|
94 | ])->getDefinition($schemaBuilder); |
|
95 | }); |
|
96 | } |
|
97 | } |
|
98 |
@@ 59-68 (lines=10) @@ | ||
56 | * @return \Youshido\GraphQL\Type\TypeInterface |
|
57 | * The type object. |
|
58 | */ |
|
59 | protected function buildArgumentType(PluggableSchemaBuilderInterface $schemaBuilder, $argument) { |
|
60 | $type = is_array($argument) ? $argument['type'] : $argument; |
|
61 | return $this->parseType($type, function ($type) use ($schemaBuilder) { |
|
62 | return $schemaBuilder->findByDataTypeOrName($type, [ |
|
63 | GRAPHQL_INPUT_TYPE_PLUGIN, |
|
64 | GRAPHQL_SCALAR_PLUGIN, |
|
65 | GRAPHQL_ENUM_PLUGIN, |
|
66 | ])->getDefinition($schemaBuilder); |
|
67 | }); |
|
68 | } |
|
69 | ||
70 | } |
|
71 |