drupal-graphql / graphql-views

11 stars 18 forks source link

Adding an exposed filter breaks GraphiQL #4

Closed blazeyo closed 6 years ago

blazeyo commented 6 years ago

Full error:

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException</em>:  in <em class="placeholder">Drupal\graphql\Plugin\GraphQL\PluggableSchemaBuilder-&gt;findByName()</em> (line <em class="placeholder">122</em> of <em class="placeholder">modules/graphql/src/Plugin/GraphQL/PluggableSchemaBuilder.php</em>). <pre class="backtrace">Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase-&gt;buildArgumentType(Object, Array) (Line: 34)
Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase-&gt;buildArguments(Object) (Line: 45)
Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase-&gt;getDefinition(Object) (Line: 94)
Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase-&gt;Drupal\graphql\Plugin\GraphQL\Schemas\{closure}(Object)
array_map(Object, Array) (Line: 95)
Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase-&gt;extractDefinitions(Array) (Line: 72)
Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase-&gt;getSchema() (Line: 139)
Drupal\graphql\GraphQL\Schema\SchemaLoader-&gt;getSchema(&#039;default&#039;) (Line: 86)
Drupal\graphql\GraphQL\Execution\QueryProcessor-&gt;processQuery(&#039;default&#039;, &#039;    query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
        subscriptionType { name }
        types {
          ...FullType
        }
        directives {
          name
          description
          locations
          args {
            ...InputValue
          }
        }
      }
    }

    fragment FullType on __Type {
      kind
      name
      description
      fields(includeDeprecated: true) {
        name
        description
        args {
          ...InputValue
        }
        type {
          ...TypeRef
        }
        isDeprecated
        deprecationReason
      }
      inputFields {
        ...InputValue
      }
      interfaces {
        ...TypeRef
      }
      enumValues(includeDeprecated: true) {
        name
        description
        isDeprecated
        deprecationReason
      }
      possibleTypes {
        ...TypeRef
      }
    }

    fragment InputValue on __InputValue {
      name
      description
      type { ...TypeRef }
      defaultValue
    }

    fragment TypeRef on __Type {
      kind
      name
      ofType {
        kind
        name
        ofType {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
                ofType {
                  kind
                  name
                  ofType {
                    kind
                    name
                  }
                }
              }
            }
          }
        }
      }
    }&#039;) (Line: 131)
Drupal\graphql\GraphQL\Utility\Introspection-&gt;introspect(&#039;default&#039;) (Line: 77)
Drupal\graphql\Controller\ExplorerController-&gt;viewExplorer(&#039;default&#039;)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 576)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 153)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 657)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
</pre>

This one works: working-example-views.view.user_articles.yml.txt

This one breaks the explorer: views.view.user_articles.yml.txt

blazeyo commented 6 years ago

Actually adding any exposed filter breaks the explorer. Fix in PR #5