Skip to content

NGRX-Entity-Relationship Graph do not receive the selector #796

@raalarcon9705

Description

@raalarcon9705

I am using ngrx-entity-relationship in my angular project with @ngrx/store.

When I try to use reduceGraph inside an effect, no change occurs in the store, and when I check the devtool I see that the selector is not reaching

this is the effect code

loadPostById$ = createEffect(() =>
    this.actions$.pipe(
      ofType(PostActions.loadPostById),
      concatMap(({ id }) =>
        this.postService.loadPostById(id).pipe(
          map((post) => reduceGraph({
            data: post,
            selector: rootPost()
          })),
          catchError((error) => of(PostActions.loadPostByIdFailure({ error })))
        )
      )
    )
  );

this is the relationships code


export const rootPost = rootEntitySelector(fromPosts.selectPostsState);
export const relPostUser = relatedEntitySelector(
  fromUsers.selectUsersState,
  'publisherId',
  'publisher'
)

This is what i see in devtool, it has no selector this is what i see in the devtool

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions