An open API service indexing awesome lists of open source software.

https://github.com/web-dev-max/next

Next and GraphQL
https://github.com/web-dev-max/next

Last synced: 2 months ago
JSON representation

Next and GraphQL

Awesome Lists containing this project

README

          

## Getting Started

First, run the development server:

```bash
node -v = 20v
# or
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Examples of queries

### Apollo Server
[http://localhost:3000/api/graphql](http://localhost:3000/api/graphql)

```bash
# Удаление пользователя

mutation {
deleteUser(id: number) {
message
}
}

# Регистрация пользователя

mutation {
registerUser(
name: ""
email: ""
password: ""
isAdmin: boolean
) {
user {
id
name
email
isAdmin
}
token
}
}

# Авторизация пользователя

mutation {
loginUser(
email: ""
password: ""
) {
user {
id
name
email
isAdmin
}
token
}
}
```