mongo-graphql-starter

Creates a fully functioning, performant, extensible GraphQL endpoint from a Mongo DB. Supports middleware, Mongo 4 transactions.

MIT License

Downloads
105
Stars
423
Committers
8
mongo-graphql-starter - v0.10.1

Published by arackaf about 5 years ago

one-to-many relationships marked as readonly no longer emit update items in schema

mongo-graphql-starter - v0.10

Published by arackaf about 5 years ago

Breaking changes

  • Appropriate return values in queries and mutations are now marked as non-null in the schema. This includes the success value in mutations. Before, there were circumstances where null was returned, mainly if a user's middleware opted to cancel out of a mutation. Now false is returned, here.

Changes to will help with tooling:

  • entireSchema.gql is now created in the root graphql folder. This file contains the entire endpoint's schema, and can be integrated with a GraphQL plugin in VS Code

  • typings option now allows you to create TypeScript typings for the endpoint

Misc Changes

  • All generated code is now formatted with Prettier.
mongo-graphql-starter - v0.9.2

Published by arackaf over 5 years ago

Update esm

mongo-graphql-starter - v0.9.1

Published by arackaf over 5 years ago

Updated a few dependencies to remove a security vulnerability.

mongo-graphql-starter - v0.9.0

Published by arackaf over 5 years ago

Some improvements in null handling. Most of these changes are fixes to bugs that existed before.

  • null values for exact matches, and ne filters will now work reliably (some would error out before)
  • null values for any other filter will now be ignored (they would usually error out before)
  • remove the _count filter that was incorrectly being created for nested objects (which never worked)
mongo-graphql-starter - v0.8.0

Published by arackaf over 5 years ago

This should be the last minor release before 1.0!

New Features: Transaction support! See the docs for details.

Breaking Changes:

  • For one-to-many relationships where the key is _id, when you delete one of the objects, all of the connected objects with a foreign key pointing to that value will be updated: if the foreign key is an array, then that _id will be $pulled; if it's a single value, then it will be cleared.

  • The hooks api has changed, slightly. For the hooks functions that take the standard root, args, context, ast values, these are now contained in a single object literal, so you can just destructure the ones you want, without needing all the positional values.

mongo-graphql-starter - v0.7.3

Published by arackaf about 6 years ago

Fix some bugs around relationships with non-_id keyFields

mongo-graphql-starter - v0.7.2

Published by arackaf about 6 years ago

Fix bug whereby nested one-to-many relationship creations were not triggering the appropriate hooks.

mongo-graphql-starter - v0.7.1

Published by arackaf about 6 years ago

Switch to non-deprecated Mongo driver methods.

mongo-graphql-starter - v0.7.0

Published by arackaf about 6 years ago

Version 0.7

Breaking changes

  • Brand new API for adding relationships. Check the docs!
  • graphql and mongodb are now just peerDependencies. They will NOT be installed with this package. Be sure to include them in your project's package.json.

New features

  • Readonly types added
  • one-to-many relationships added
  • New option to specify your own hooks file
mongo-graphql-starter - v0.6.23

Published by arackaf about 6 years ago

Tweak relationships using a keyField other than _id to not require that field be selected on the underlying objects.

mongo-graphql-starter - v0.6.22

Published by arackaf about 6 years ago

Allow relationship foreign keys to point to arbitrary fields, instead of hard-coding to _id.

mongo-graphql-starter - v0.6.21

Published by arackaf about 6 years ago

mongo-graphql-starter - 0.6.20

Published by arackaf over 6 years ago

Support mongodb driver 3.0

mongo-graphql-starter - 0.6.19

Published by arackaf over 6 years ago

Update esm package

mongo-graphql-starter - 0.6.18

Published by arackaf over 6 years ago

Fix graphql dependency to be listed in dependencies instead of devDependencies

mongo-graphql-starter - 0.6.17

Published by arackaf over 6 years ago

JSON data type is now supported

mongo-graphql-starter - 0.6.16

Published by arackaf over 6 years ago

Fix async errors that happen when single object relationships have a null foreign key

mongo-graphql-starter - 0.6.15

Published by arackaf over 6 years ago

Pre-aggregate hook added

mongo-graphql-starter - 0.6.14

Published by arackaf over 6 years ago

Add a fix to the validation improvement from 0.6.13 for single update mutations.