Giter VIP home page Giter VIP logo

Comments (4)

Urigo avatar Urigo commented on May 27, 2024

Can you set up a simple example we can collaborate on?

from loona.

evertonrobertoauler avatar evertonrobertoauler commented on May 27, 2024

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.

Urigo avatar Urigo commented on May 27, 2024

@evertonrobertoauler what real time solution would actually want to you?

from loona.

evertonrobertoauler avatar evertonrobertoauler commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.