title: Fastapi + Strawberry GraphQL
body: <p>I'm currently building a microservice with <code>fastapi</code>.</p>
  <p>I want to expose my underlying data via <code>graphql</code> on an additional route.
  Direct integration from starlette has been deprecated so I tried to use one of the recommended packages <code>strawberry</code>.
  At the moment, it seems impossible to use in combination with grapqhl.</p>
  <h2 id="example">Example</h2>
  <p><code>my_grapqhql.py</code></p>
  <pre><code>from typing import List
  import strawberry
  
  @strawberry.type
  class Book:
      title: str
      author: str
  
  @strawberry.type
  class Query:
      books: List[Book]
  
  schema = strawberry.Schema(query=Query)
  </code></pre>
  <h2 id="what-i-tried">What I tried</h2>
  <p>In the fastapi documentation, asgi components are added like so:</p>
  <p><code>main.py</code></p>
  <pre><code>from fastapi import FastAPI
  from strawberry.asgi import GraphQL
  from .my_graphql.py import schema
  
  app = FastAPI()
  app.add_middleware(GraphQL, schema=schema)
  </code></pre>
  <p>Unfortunately this doesn't work:</p>
  <p><code>TypeError: __init__() got an unexpected keyword argument 'app'</code></p>
  <p>when I switch the last line to mount a module is atleast starts:</p>
  <pre><code>app.mount(&quot;/graphql&quot;, GraphQL(schema))
  </code></pre>
  <p>but the route doesn't load.</p>