@medplum/fhir-router 2.0.23 → 2.0.24

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.
@@ -1,8 +1,8 @@
1
+ import { SearchRequest } from '@medplum/core';
2
+ import { OperationOutcome, Reference, Resource, ResourceType } from '@medplum/fhirtypes';
3
+ import DataLoader from 'dataloader';
1
4
  import { GraphQLError, GraphQLFieldConfigArgumentMap, GraphQLResolveInfo, GraphQLScalarType } from 'graphql';
2
5
  import { FhirRepository } from '../repo';
3
- import DataLoader from 'dataloader';
4
- import { OperationOutcome, Reference, Resource, ResourceType } from '@medplum/fhirtypes';
5
- import { SearchRequest } from '@medplum/core';
6
6
  export interface GraphQLContext {
7
7
  repo: FhirRepository;
8
8
  dataLoader: DataLoader<Reference, Resource>;
@@ -30,7 +30,7 @@ export declare function buildSearchArgs(resourceType: string): GraphQLFieldConfi
30
30
  * @param path The GraphQL node path.
31
31
  * @returns The "depth" of the node.
32
32
  */
33
- export declare function getDepth(path: ReadonlyArray<string | number>): number;
33
+ export declare function getDepth(path: readonly (string | number)[]): number;
34
34
  /**
35
35
  * Returns true if the field is requested in the GraphQL query.
36
36
  * @param info The GraphQL resolve info. This includes the field name.
@@ -43,4 +43,4 @@ export declare function isFieldRequested(info: GraphQLResolveInfo, fieldName: st
43
43
  * @param errors Array of GraphQL errors.
44
44
  * @returns OperationOutcome with the GraphQL errors as OperationOutcome issues.
45
45
  */
46
- export declare function invalidRequest(errors: ReadonlyArray<GraphQLError>): OperationOutcome;
46
+ export declare function invalidRequest(errors: readonly GraphQLError[]): OperationOutcome;
@@ -165,7 +165,7 @@ export declare class MemoryRepository extends BaseRepository implements FhirRepo
165
165
  patchResource(resourceType: string, id: string, patch: Operation[]): Promise<Resource>;
166
166
  readResource<T extends Resource>(resourceType: string, id: string): Promise<T>;
167
167
  readReference<T extends Resource>(reference: Reference<T>): Promise<T>;
168
- readReferences(references: readonly Reference<Resource>[]): Promise<(Resource | OperationOutcomeError)[]>;
168
+ readReferences(references: readonly Reference[]): Promise<(Resource | OperationOutcomeError)[]>;
169
169
  readHistory<T extends Resource>(resourceType: string, id: string): Promise<Bundle<T>>;
170
170
  readVersion<T extends Resource>(resourceType: string, id: string, versionId: string): Promise<T>;
171
171
  search<T extends Resource>(searchRequest: SearchRequest): Promise<Bundle<T>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/fhir-router",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "Medplum FHIR Router",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",