What is Pragma?
Pragma is a language for building GraphQL APIs in no time, by defining data models and their associated validation, transformation, and authorization logic.
For example, you can create a
Pragmafile with the following content:
Pragma supports importing serverless functions for extending the API's functionality. In this case,
These two functions are used to validate every user object and set its
fullName field on every
Pragma has built-in support for authorization, meaning you can define access rules to specify the actions each kind of user can perform, and when.
This is all the code you need to write in order to set up a GraphQL API with user authentication and very flexible queries and mutations for creating, reading, updating, and deleting user data. For example:
This mutation returns the
fullName of the newly created user. See The Generated API section for more details.
For a step-by-step tutorial on Pragma, see the Basic Todo App page.
It Saves Your Time
Pragma doesn't make you worry about networking, writing resolvers, or (when using the Pragma Cloud) deployment. It offers what we believe is the best server-side application development experience.
Definitions are concise, readable, high-level, and maintainable. It keeps configuration and boilerplate you need to write and keep in mind at a minimum (no code generation, all the complexity is abstracted). You focus on your business logic and nothing else.
A simple todo app with user authentication and permissions can be expressed in under 30 lines of code.
It Integrates with Many Languages
It Runs Locally
You can easily install Pragma on you laptop and start development within seconds. The only two requirements for running Pragma are Docker and Docker Compose. See the Install Pragma page chapter.
One your application is ready for deployment, you can deploy it to your own servers, or any cloud platform that supports Pragma.
No Vendor Lock-In
Pragma applications are extremely easy to move from any cloud provider to another, as long as they have a Kubernetes offering.