@livestore/livestore 0.0.57-dev.8 → 0.0.58-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/store.ts CHANGED
@@ -65,6 +65,7 @@ export type StoreOptions<
65
65
  > = {
66
66
  adapter: StoreAdapter
67
67
  schema: TSchema
68
+ storeId: string
68
69
  // TODO remove graphql-related stuff from store and move to GraphQL query directly
69
70
  graphQLOptions?: GraphQLOptions<TGraphQLContext>
70
71
  otelOptions: OtelOptions
@@ -615,6 +616,7 @@ export class Store<
615
616
  export type CreateStoreOptions<TGraphQLContext extends BaseGraphQLContext, TSchema extends LiveStoreSchema> = {
616
617
  schema: TSchema
617
618
  adapter: StoreAdapterFactory
619
+ storeId: string
618
620
  reactivityGraph?: ReactivityGraph
619
621
  graphQLOptions?: GraphQLOptions<TGraphQLContext>
620
622
  otelOptions?: Partial<OtelOptions>
@@ -661,9 +663,10 @@ export const createStore = <
661
663
  TSchema extends LiveStoreSchema = LiveStoreSchema,
662
664
  >({
663
665
  schema,
666
+ adapter: adapterFactory,
667
+ storeId,
664
668
  graphQLOptions,
665
669
  otelOptions,
666
- adapter: adapterFactory,
667
670
  boot,
668
671
  reactivityGraph = globalReactivityGraph,
669
672
  batchUpdates,
@@ -733,6 +736,7 @@ export const createStore = <
733
736
 
734
737
  const adapter: StoreAdapter = yield* adapterFactory({
735
738
  schema,
739
+ storeId,
736
740
  devtoolsEnabled: disableDevtools !== true,
737
741
  bootStatusQueue,
738
742
  shutdown,
@@ -828,6 +832,7 @@ export const createStore = <
828
832
  fiberSet,
829
833
  runtime,
830
834
  batchUpdates: batchUpdates ?? ((run) => run()),
835
+ storeId,
831
836
  },
832
837
  span,
833
838
  )