Skip to content

OssamaRafique/Apollo-GraphQL-Starter-Kit-User-Login-File-Uploader

Repository files navigation

🚀 Apollo GraphQL Starter Kit

Version License: MIT Buy Me A Coffee Twitter: OssamaRafique

Run the Project

Rename env.example to .env and fill in the details

PORT=3000
MongoDB_URL=
JWT_SECRET_KEY=
S3_ENABLED=Values "yes" or "no"
S3_ACCESS_KEY=
S3_SECRET=
S3_BUCKET=
npm install
node server.js

GraphQL Schema

directive @cacheControl(
  maxAge: Int
  scope: CacheControlScope
) on FIELD_DEFINITION | OBJECT | INTERFACE
enum CacheControlScope {
  PUBLIC
  PRIVATE
}

type Component {
  id: ID!
  identifier: String!
  picture: String!
  code: String!
}

scalar DateTime

type File {
  filename: String!
  mimetype: String!
  encoding: String!
}

input LoginInput {
  email: String!
  password: String!
}

type Mutation {
  _: String
  signup(input: SignupInput): User
  login(input: LoginInput): Token
}

type Query {
  _: String
  users: [User!]
  user(email: String!): User
  components: [Component!]
}

input SignupInput {
  name: String!
  email: String!
  password: String!
  avatar: Upload!
}

type Token {
  token: String!
}

scalar Upload

type User {
  id: ID!
  name: String!
  email: String!
  avatar: String!
  role: Int!
  createdAt: DateTime!
  updatedAt: DateTime!
}

Author

👤 Ossama Rafique

Show your support

Give a ⭐️ if this project helped you!

ko-fi

About

Modular GraphQL Implementation With User Authentication and File Uploader (Disk + S3). Will be adding more features soon.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published