@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.
- package/dist/cjs/index.cjs +15 -12
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/cjs/index.min.cjs.map +1 -1
- package/dist/esm/index.min.mjs +1 -1
- package/dist/esm/index.min.mjs.map +1 -1
- package/dist/esm/index.mjs +15 -12
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/graphql/utils.d.ts +5 -5
- package/dist/types/repo.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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:
|
|
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:
|
|
46
|
+
export declare function invalidRequest(errors: readonly GraphQLError[]): OperationOutcome;
|
package/dist/types/repo.d.ts
CHANGED
|
@@ -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
|
|
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>>;
|