ramyelkest / apollo-chat-api Goto Github PK
View Code? Open in Web Editor NEWA chat API service over graphql with apollo
License: MIT License
A chat API service over graphql with apollo
License: MIT License
Currently api/queries/models.js uses mock data
The idea is to create mongodb collections, and define the schemas with mongoose (this should be in a separate file/folder connectors.js
over an interface (so no db queries directly in models.js)
As far as I can see we only have 3 collections, Users, Threads and Messages.
We'll probably also need a seed file (which will probably just populate the current mock data)
Start with as little or as much as you feel like, I can break this down, post here before starting as to not step over each other;)
Thanks
package.json
Users
Threads
and Messages
(and any more you can think of)mongodb.js
in connectors folder (This is an interface which will be called from the models)mongodb.test.js
for mongodb.js
migration/setup
and seed
file to populate mock dataonly a couple of files need tests see coveralls for more info
The API should be able to get messages for a specific thread ID, rather than all threads
and add to readme
Branch | Build failing 🚨 |
---|---|
Dependency | mongoose |
Current Version | 4.7.9 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mongoose is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪
The new version differs by 81 commits .
b03d06c
chore: release 4.8.0
3e76041
test(aggregate): make test more robust
bca9679
Merge pull request #4936 from Automattic/4.8
9436b8a
Merge pull request #4912 from QuotableWater7/smarter-queries
db4658a
Merge pull request #4831 from dkrosso/strict-childschema-1
ea37994
chore: now working on 4.7.10
4776208
test(aggregate): fix flakey test
d08f0d4
test(Aggregate): Add database call test for facet
e26d7a7
Merge branch '4.8' into add-facet-tests
6f9bd23
test(Aggregate): Add test for facet operator
6c67ce4
fix(document): correct handling for decimals in toObject
64d8de2
feat(schema): add Decimal as alias for Decimal128
243ab7f
chore(Aggregate): Make alerts/notes consistent in documentation
8c207f2
Merge branch 'add-facet-operator' into 4.8
7314bf9
docs(Aggregate): Add documentation for facet operator
There are 81 commits in total. See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴
Branch | Build failing 🚨 |
---|---|
Dependency | mongoose |
Current Version | 4.6.6 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mongoose is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪
The new version differs by 23 commits .
ee997f9
chore: release 4.6.7
9a270a4
test(populate): improve flakey test
e103ceb
fix(document): only invalidate in subdoc if using update validators
2270a3e
test(document): repro #4681
b49ea86
fix(document): make sure to depopulate top level for sharding
61736f6
test(document): repro #4658
216401c
fix(document): handle setting single nested doc to the same value
9fc9eee
test(document): repro #4676
db30110
fix(document): don't create subdocs when excluded in projection
91b0fd3
test(document): repro #4669
ca965d4
fix(connection): throw more helpful error when .model() called incorrectly
966b6ed
fix(document): ensure single embedded schema validator runs with correct context
3766cbe
test(document): repro #4663
1a93d1f
fix(drivers): make debug output better by calling toBSON()
b996374
fix(query): handle setDefaultsOnInsert with defaults on doc arrays
There are 23 commits in total. See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴
broken with 823ba2f
we just need a driver to import and run seeds()
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Hi,
I've followed the same pattern for the connector in my own code. What I'm noticing though is that the requests never get to use the cache because the promises seem to always be pending.
Are you seeing this or perhaps this is an error in my code?
` return Promise.all(urls.map((url) => {
console.log("fetching", url);
const cachedRes = this.eTagCache[url];
if (cachedRes && cachedRes.eTag) {
options.headers['If-None-Match'] = cachedRes.eTag;
}
console.log("cache", this.loader); // cached promises are always pending
return new Promise((resolve, reject) => {
this.rp({
uri: url,
...options,
}).then((response) => { resolve(response) ... }.catch((err) => {reject(err) ... }`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.