File: schema.py

package info (click to toggle)
strawberry-graphql-django 0.62.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,968 kB
  • sloc: python: 27,530; sh: 17; makefile: 16
file content (13 lines) | stat: -rw-r--r-- 228 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
import typing

import strawberry


@strawberry.type
class Query:
    @strawberry.field
    def hello(self, name: typing.Optional[str] = None) -> str:
        return f"Hello {name or 'world'}"


schema = strawberry.Schema(Query)