Comments (2)
Would you consider working with Grapqhl and FaunaDB or the FQL/driver is the "main argument" on adopting Fauna ?
from faunadb-swift.
@evbruno I would consider using the faunadb graphql api assuming that I can express all the interactions I need to support via faunadb auto-generated graphql api without having to overly contort my UI code ...
I've done some previous investigation of the faunadb graphql api -- but not used it yet for anything. A clean way to easily support upsert's seemed like it was missing when I last looked ... I want to have the simplest possible interface to the datastore from my UI -- as well as ensure that the client mutation model always loses as little information as possible. I want the application data layer to be easily organized in a way that will work well for declarative UI CRUD.
Upsert seems like a pretty convenient operation for simplifying the general programming model for CRUD for use in declarative UI while maintaining straightforward/clear ways to solve problems in a clean way (in my previous experiences) ... So I tend to look for 'how would upsert look' when evaluating a data management api ...
I see a partialUpdateMutation feature in preview now -- which might help ... --
https://docs.fauna.com/fauna/current/api/graphql/previews/partial_update_mutation
Feature seems interesting -- achieving the same with a postgres jsonb store requires either a whole bunch of hideous jsonb partial-update syntax or requires wrapping things carefully in serializable transactions to avoid read/write races -- so I appreciate this operation. But this op doesn't appear like it would directly support the ability for upsert to create an entity that doesn't yet exist when ID! is nil -- ? I think my ideal interface would consolidate create and update this way -- seems like it would be especially convenient when mutating embedded entities ...
If an embedded type is an array -- is there a way to do a partial update to add a new element to that array without sending a payload that contains all array elements?
I'd really like mutations (for say -- @Embedded types) to follow some form of consistent convention from the perspective of client code ...
upsert({some_collection, some_owner_id, { some_embedded_array: {prop1: "foo"}})
upsert({some_collection, some_owner_id: { some_embedded_array: {id: "foo", prop2: "bar"}})
upsert({some_collection, some_owner_id: { some_embedded_array: {id: "foo", prop1: "bar1"}})
// doc for some_owner_id: after running
{
...,
some_embedded_array: [
{id: "something_autogenerated", prop1: "foo"},
{id: "foo", prop2: "bar", prop1: "bar1"}
]
}
Not certain how many hoops are needed to achieve a client-side interface like this via the graphql api ...
from faunadb-swift.
Related Issues (20)
- Client class enhancements HOT 4
- All expressions should have empty parameters initialisers HOT 3
- Result parsing is a bit verbose HOT 7
- Mapper struct should be more specific about scalar types HOT 2
- ClientObserverType should not print the user's credential HOT 6
- Investigate support for Integer types HOT 5
- Make the public DSL less dependent on knowledge about internal types HOT 7
- Lamdba syntax sugar parameters type.
- SetRef implementation.
- Proposal: Do not expose NSURLSessionDataTask in Client API. HOT 2
- Authentication functions.
- Implement `value.getCollection((path|fields:)`
- Currently Driver testing coverage.
- Add support for Swift 3 - Xcode 8 HOT 1
- Improve example app by showing how to use the driver without reactive helpers.
- Write readme.
- Improve test code coverage.
- Add support for tvOS, OSX, watchOS. HOT 1
- Automate framework binary creation for all platforms and attach them to github release HOT 1
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 faunadb-swift.