Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pull API / Wildcard Support #97

Open
Labels
enhancementNew feature or request
@crs48

Description

@crs48

Reentity.get(“*”) can you talk a bit more about your use case? I ask because there are a lot of ways to go about implementing this. The underlying datalog DB does support patterns similar to this, but they have different tradeoffs when connecting them to React and doing the live updating. At the moment we treatentity.get(“specificAttribute”) as a whitelist, so we only cache data and rerender components when those specific attributes change. If debugging is the issue we justreleased custom chrome formatters so you can log out entities and inspect all their attributes in the console. We’re also working on a chrome extension to read and eventually write to the database from a GUI. If it’s something more like GraphQL that you want, we’re talking about exposing the pull syntax which is essentially GraphQL. I’m hesitant to just expose anentity.get(“*”) function since that would have severe performance costs in the context of React if used naively, and it’s ripe for naive use since it’s probably the first thing a new developer would try.
@smothers

re: entity.get("*"), this is roughly what I'm trying to do.

constonDragEnd=(event)=>{if(event.condition){transact([{entity:{name:baseEntity.get("name"),component:baseEntity.get("component"),width:baseEntity.get("width"),height:baseEntity.get("height"),ownerId:baseEntity.get("ownerId"),// +maybe some other props I don't know about? and those could vary depending on the entity too.}}])}}

So again this is just querying the database directly, no need to subscribe to anything. but on the other hand if it is only exposed when querying the database directly, that could feel a bit inconsistent?

I'm actually not sure yet I will need it to be this dynamic, so hardcoding the props is okay in the meantime. but it was something I thought would be there and went looking for in the docs.

Cheers.

Originally posted by@MioQuispe in#80 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp