Comments (2)
hi @jthegedus
Thanks for the solid points and detailed information!
Base on your information, it comes with all different forms in terms of initializeApp
argument.
Thus, I decided to let developers choose what to pass in intializeApp
.
Starting from v2.0.0
, you may use the following api:
With serviceAccount
const databaseURL = `https://${serviceAccount.project_id}.firebaseio.com`;
const gqlify = new Gqlify({
sdl,
dataSources: {
firestore: args => new FirestoreDataSource({
// config will be passed to initializeApp directly
config: {
credential: admin.credential.cert(serviceAccount),
databaseURL,
},
collection: args.key,
}),
},
});
In cloud function
const gqlify = new Gqlify({
sdl,
dataSources: {
firestore: args => new FirestoreDataSource({
// just remove `config` argument, nothing will be passed to initializeApp
collection: args.key,
}),
},
});
The document will be updated later. Let me know how you think
from gqlify.
A much more flexible API, thanks a bunch Will. Works brilliantly!
from gqlify.
Related Issues (20)
- Atomic operation on nested array in GraphQL API
- Support firestore.FieldValue.serverTimestamp()
- Encapsulate payload in update passed to dataSource HOT 1
- Latest graphql causes error HOT 3
- I can't seem to find the docs to contribute HOT 2
- Security Features HOT 3
- implement apollo-server-lambda with MongoDataSource HOT 6
- Support Firestore sub-collections HOT 5
- Support changing the payload when updating.
- Support more operators
- Datamodel types without scalar fields break GQLify generation
- @unique dosen't work when I use it in another attibut
- Give it a new future HOT 1
- .
- TypeError: Cannot set property 'PageInfo' of undefined HOT 5
- latest graphql causes error again! HOT 1
- Data model relationship generation
- How to make a many-to-many relation in default data for memory datasource
- Project status?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gqlify.