# Path: tests/starwars/fixtures.py
# class Character:
# class Human(Character):
# class Droid(Character):
#     def __init__(self, id, name, friends, appearsIn, homePlanet):
#     def __init__(self, id, name, friends, appearsIn, primaryFunction):
# def get_character(id):
# def get_characters(ids):
# def get_friends(character):
# def get_hero(episode):
# async def get_hero_async(episode):
# def get_human(id):
# def get_droid(id):
# def create_review(episode, review):


import asyncio
from graphql import (
    GraphQLArgument,
    GraphQLEnumType,
    GraphQLEnumValue,
    GraphQLField,
    GraphQLInputField,
    GraphQLInputObjectType,
    GraphQLInt,
    GraphQLInterfaceType,
    GraphQLList,
    GraphQLNonNull,
    GraphQLObjectType,
    GraphQLSchema,
    GraphQLString,
    get_introspection_query,
    graphql_sync,
    print_schema,
)
from .fixtures import (
    create_review,
    get_characters,
    get_droid,
    get_friends,
    get_hero_async,
    get_human,
    reviews,
)
            GraphQLNonNull(GraphQLString), description="The id of the human.",
        ),
        "name": GraphQLField(GraphQLString, description="The name of the human.",),
        "friends": GraphQLField(
            GraphQLList(character_interface),
            description="The friends of the human, or an empty list if they have none.",
            resolve=lambda human, _info: get_friends(human),
        ),
        "appearsIn": GraphQLField(
            GraphQLList(episode_enum), description="Which movies they appear in.",
        ),
        "homePlanet": GraphQLField(
            GraphQLString,
            description="The home planet of the human, or null if unknown.",
        ),
    },
    interfaces=[character_interface],
    description="A humanoid creature in the Star Wars universe.",
)

droid_type = GraphQLObjectType(
    "Droid",
    lambda: {
        "id": GraphQLField(
            GraphQLNonNull(GraphQLString), description="The id of the droid.",
        ),
        "name": GraphQLField(GraphQLString, description="The name of the droid.",),
        "friends": GraphQLField(
            GraphQLList(character_interface),
            description="The friends of the droid, or an empty list if they have none.",

# Path: tests/starwars/fixtures.py
# class Character:
# class Human(Character):
# class Droid(Character):
#     def __init__(self, id, name, friends, appearsIn, homePlanet):
#     def __init__(self, id, name, friends, appearsIn, primaryFunction):
# def get_character(id):
# def get_characters(ids):
# def get_friends(character):
# def get_hero(episode):
# async def get_hero_async(episode):
# def get_human(id):
# def get_droid(id):
# def create_review(episode, review):


# Path: tests/starwars/schema.py
import asyncio
from graphql import (
    GraphQLArgument,
    GraphQLEnumType,
    GraphQLEnumValue,
    GraphQLField,
    GraphQLInputField,
    GraphQLInputObjectType,
    GraphQLInt,
    GraphQLInterfaceType,
    GraphQLList,
    GraphQLNonNull,
    GraphQLObjectType,
    GraphQLSchema,
    GraphQLString,
    get_introspection_query,
    graphql_sync,
    print_schema,
)
from .fixtures import (
    create_review,
    get_characters,
    get_droid,
    get_friends,
    get_hero_async,
    get_human,
    reviews,
)

            GraphQLNonNull(GraphQLString), description="The id of the human.",
        ),
        "name": GraphQLField(GraphQLString, description="The name of the human.",),
        "friends": GraphQLField(
            GraphQLList(character_interface),
            description="The friends of the human, or an empty list if they have none.",
            resolve=lambda human, _info: get_friends(human),
        ),
        "appearsIn": GraphQLField(
            GraphQLList(episode_enum), description="Which movies they appear in.",
        ),
        "homePlanet": GraphQLField(
            GraphQLString,
            description="The home planet of the human, or null if unknown.",
        ),
    },
    interfaces=[character_interface],
    description="A humanoid creature in the Star Wars universe.",
)

droid_type = GraphQLObjectType(
    "Droid",
    lambda: {
        "id": GraphQLField(
            GraphQLNonNull(GraphQLString), description="The id of the droid.",
        ),
        "name": GraphQLField(GraphQLString, description="The name of the droid.",),
        "friends": GraphQLField(
            GraphQLList(character_interface),
            description="The friends of the droid, or an empty list if they have none.",

            resolve=lambda droid, _info: get_friends(droid),