Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

feat: graphql#371

Draft
jackcmeyer wants to merge 14 commits into
masterfrom
add-graphql
Draft

feat: graphql#371
jackcmeyer wants to merge 14 commits into
masterfrom
add-graphql

Conversation

@jackcmeyer

Copy link
Copy Markdown
Member

No description provided.

@jackcmeyer jackcmeyer requested a review from fox1t October 22, 2020 21:45
@gitpod-io

gitpod-io Bot commented Oct 22, 2020

Copy link
Copy Markdown

@fox1t fox1t left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM however we should remove mongoose from the project. Usually, it becomes a major pain and bottleneck when using mongodb in production.

Comment thread package.json
"graphql-tools": "~6.2.0",
"make-promises-safe": "~5.1.0",
"mercurius": "~6.3.0",
"mongoose": "~5.10.7",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not going to use mongoose since it is really slow and it will become a major bottleneck soon. For the moment we can leave just the mongodb driver

Comment thread package.json
"@commitlint/prompt": "~11.0.0",
"@types/glob": "~7.1.1",
"@types/mkdirp": "~1.0.0",
"@types/mongoose": "~5.7.36",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this.

Comment thread src/app.ts
// fastify.register(fastifyHelmet)
fastify.register(mercurius, {
defineMutation: true,
} as any)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the types wrong here? If so we can make a PR to mercurius.

Comment thread src/db/PatientEntity.ts
import mongoose, { Schema, Types } from 'mongoose'
import Patient from '../model/Patient'

const PatientSchema = new Schema({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use json schema for the schemas so we can add them to fastify too when needed.

Comment thread package.json
"fastify-no-icon": "~4.0.0",
"fastify-plugin": "~3.0.0",
"graphiql": "~1.0.5",
"graphql-tools": "~7.0.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed a comma here which is causing build failure. Thankyou

@CLAassistant

CLAassistant commented Jan 30, 2021

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 3 committers have signed the CLA.

✅ tehKapa
❌ jackcmeyer
❌ fox1t
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants