@@ 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 |
@@ 55-64 (lines=10) @@ | ||
52 | * @return \Youshido\GraphQL\Type\TypeInterface |
|
53 | * The type object. |
|
54 | */ |
|
55 | protected function buildArgumentType(PluggableSchemaBuilderInterface $schemaBuilder, $argument) { |
|
56 | $type = is_array($argument) ? $argument['type'] : $argument; |
|
57 | return $this->parseType($type, function ($type) use ($schemaBuilder) { |
|
58 | return $schemaBuilder->findByDataTypeOrName($type, [ |
|
59 | GRAPHQL_INPUT_TYPE_PLUGIN, |
|
60 | GRAPHQL_SCALAR_PLUGIN, |
|
61 | GRAPHQL_ENUM_PLUGIN, |
|
62 | ])->getDefinition($schemaBuilder); |
|
63 | }); |
|
64 | } |
|
65 | ||
66 | } |
|
67 |