Comments (4)
Can you set up a simple example we can collaborate on?
from loona.
https://stackblitz.com/edit/angular-hvefbv
src/app/books.state.ts
export class BooksState {
@Resolve('Query.books')
books() {
return interval(1000)
.pipe(map(i => [{ id: i + 1, title: 'Harry Potter', __typename: 'Book' }]))
.pipe(first())
.pipe(tap(i => console.log(i)))
.pipe(shareReplay(1));
}
This interval(1000)
can represent a query to a Realtime database or a web socket, if you comment the line .pipe(first())
this observable will emit values but will not complete, as you will see, the books array will never show on screen.
This would be like a GraphQL Subscription.
from loona.
@evertonrobertoauler what real time solution would actually want to you?
from loona.
I'm using the Firebase Firestore database, reading more about the apollo client architecture, I came across the apollo link documentation, I believe this can be an alternative for me, do you believe that the best way for me to query and manipulate my firestore data using Graphql without the need for a graghql server is by creating my own apollo-link.
from loona.
Related Issues (18)
- something is not right with documentation HOT 4
- schematics
- how to support subscriptions and sync with server HOT 2
- schematics "ng-add" not found
- default ng build --prod generating console errors HOT 2
- PatchFragment with nested fragments HOT 1
- Child state conflict if multiple lazy-loaded states are present
- Request for a working example with React and TypeScript.
- apollo-link-state is deprecated HOT 3
- Docs: Mention that states need to be registered in forRoot() HOT 1
- Maintenance status of this project HOT 9
- Documentation Example with Query Variables?
- Incorrect Typescript typings HOT 8
- Featuring loona in Docusaurus
- Documentation on Actions/Effects
- @Mutation resolver is not called when dispatching action
- Is this repository still maintained - any benefit to use it since Apollo allows local data management as well? HOT 4
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 loona.