Skip to content

Abstraction for proxy server #33

@rafalp

Description

@rafalp

Current API for proxy server definition is quite complex and requires devs to remember a bunch of things when defining a server. We could provide alternative abstraction to make this simpler.

For example:

from ariadne_graphql_proxy.proxy import CachePolicy, ForeignKey, GraphQLProxy, RemoteSchema, LocalSchema


app = GraphQLProxy(
  schemas=[
    RemoteSchema(url="https://example.com", exclude=...),
    LocalSchema(schema),
  ],
  foreign_keys={
    "Mutation": {
      "checkoutComplete": ForeignKey(key=["id"], resolver=ForeignKeyResolver(...))
    }
  },
  cache={
    "Query": {
      "products": CachePolicy(ttl=3600),
    }
  }
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions