# Poser

Poser is a mock server that can mimic different type of APIs, with support for state, mutations and authentication. Multiple APIs and services can be mocked (GraphQL, REST, JSON, etc.) and packaged for re-use.

# Why Poser

Poser was developed to solve local development problems and improve developer experience when building projects that rely on other DataCamp services:

  • engineers need to run services they don't own locally
  • testing is difficult, especially in CI
  • Kong, our API gateway, does not exist in local development, making it difficult to perform the built-in authentication it provides

# Developing locally

Poser can replace actual services running locally. It will also make it easier to tweak responses from these services to match the needs of different projects.

# Testing and CI

Relying on external services is most painful when running end-to-end tests. In such tests, we want to exercise our full codebase, from frontend to backend. When the backend or frontend needs to call an external service, Poser can respond instead.

  • Much faster than real services
  • Easier to setup and maintain
  • You are in control of what data is returned

# Pre-configured services

Mock services can be made available as NPM packages to be re-used across the organization. These pre-configured services often include schemas and some mocks, resolvers, and fixtures. They can be extended locally with additional mocks, resolvers or fixtures.