3.1.7 • Published 2 months ago

@pothos-examples/prisma-smart-subscriptions-apollo v3.1.7

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

A GraphQL API built with prisma with subscriptions for basic CRUD mutations

This example uses the following packages:

  • @pothos/core: For building the schema
  • @pothos/plugin-prisma: For prisma based type definitions, and efficient queries
  • @pothos/plugin-smart-subscriptions: For automatically create subscription from db query
  • @prisma/client: For querying data from a database
  • prisma: For running migrations and generating @prisma/client
  • @apollo/server: For creating a server that executes the schema
  • express: Mandatory for Apollo v4 subscriptions

This is a fairly basic implementation, and may not represent best practices for production, but should help demonstrate how smart subscriptions could be implemented.

Schema

type Comment {
  author: User!
  comment: String!
  id: ID!
  post: Post!
}

type Mutation {
  createOneUser(firstName: String!, lastName: String!): User!
}

type Post {
  author: User!
  comments: [Comment!]!
  content: String!
  id: ID!
  title: String!
}

type Query {
  countManyUser: Int!
}

type Subscription {
  countManyUser: Int!
}

type User {
  comments: [Comment!]!
  firstName: String!
  fullName: String!
  id: ID!
  lastName: String!
  posts: [Post!]!
}
3.1.7

2 months ago

3.1.6

2 months ago

3.1.5

2 months ago

3.1.4

2 months ago

3.1.3

3 months ago

3.0.0-next.2

6 months ago

3.0.0-next.1

6 months ago

3.0.0-next.4

6 months ago

3.0.0-next.3

6 months ago

3.0.0-next.0

6 months ago

2.6.55

6 months ago

3.0.4

5 months ago

3.0.3

5 months ago

3.0.1

6 months ago

3.0.6

5 months ago

3.0.5

5 months ago

3.0.0

6 months ago

3.1.2

4 months ago

3.1.1

5 months ago

3.1.0

5 months ago

2.6.54

7 months ago

2.6.53

8 months ago

2.6.52

10 months ago

2.6.51

10 months ago

2.6.50

11 months ago

2.6.49

12 months ago

2.6.48

1 year ago

2.6.47

1 year ago

2.6.46

1 year ago

2.6.26

1 year ago

2.6.27

1 year ago

2.6.28

1 year ago

2.6.29

1 year ago

2.6.22

1 year ago

2.6.23

1 year ago

2.6.24

1 year ago

2.6.25

1 year ago

2.6.37

1 year ago

2.6.38

1 year ago

2.6.39

1 year ago

2.6.33

1 year ago

2.6.34

1 year ago

2.6.35

1 year ago

2.6.36

1 year ago

2.6.30

1 year ago

2.6.31

1 year ago

2.6.32

1 year ago

2.6.44

1 year ago

2.6.45

1 year ago

2.6.40

1 year ago

2.6.41

1 year ago

2.6.42

1 year ago

2.6.43

1 year ago

2.6.19

2 years ago

2.6.18

2 years ago

2.6.20

2 years ago

2.6.21

2 years ago

2.6.17

2 years ago

2.6.16

2 years ago

2.6.15

2 years ago

2.6.14

2 years ago

2.6.13

2 years ago

2.6.12

2 years ago

2.6.11

2 years ago

2.6.10

2 years ago

2.6.9

2 years ago

2.6.8

2 years ago

2.6.7

2 years ago

2.6.6

2 years ago

2.6.5

2 years ago

2.6.4

2 years ago

2.6.1

2 years ago

2.6.3

2 years ago

2.6.2

2 years ago

2.5.0

2 years ago

2.4.19

2 years ago

2.5.2

2 years ago

2.6.0

2 years ago

2.5.1

2 years ago

2.5.4

2 years ago

2.5.3

2 years ago

2.4.21

2 years ago

2.4.20

2 years ago

2.4.18

2 years ago