File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ export interface FGraphQLHookOptions {
237
237
schema : string ;
238
238
resolvers : FGraphQLResolverMap | FGraphQLResolverMapFactory ;
239
239
query : Query | SyncContextFunction < Query > ;
240
- options : FGraphQLOptions ;
240
+ options ? : FGraphQLOptions ;
241
241
runTime : any ;
242
242
parse : typeof parse ;
243
243
}
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ import {
63
63
validate ,
64
64
validateSchema ,
65
65
when ,
66
- FGraphqlOptions ,
66
+ FGraphQLHookOptions ,
67
67
} from 'feathers-hooks-common' ;
68
68
import ajv = require( 'ajv' ) ;
69
69
import { parse } from 'graphql' ;
@@ -219,7 +219,7 @@ fastJoin(ctx => postResolvers);
219
219
fastJoin ( postResolvers ) ;
220
220
221
221
// used from https://github.com/feathers-plus/hooks-graphql-example
222
- const fgraphqlOptions : FGraphqlOptions = {
222
+ const fgraphqlOptions : FGraphQLHookOptions = {
223
223
parse,
224
224
runTime : null ,
225
225
schema : `` ,
@@ -242,7 +242,7 @@ const fgraphqlOptions: FGraphqlOptions = {
242
242
// $ExpectType Hook
243
243
fgraphql ( fgraphqlOptions ) ;
244
244
245
- const fgraphqlOptions2 : FGraphqlOptions = {
245
+ const fgraphqlOptions2 : FGraphQLHookOptions = {
246
246
...fgraphqlOptions ,
247
247
query : ( context : HookContext ) => ( {
248
248
posts : { } ,
@@ -257,6 +257,14 @@ const fgraphqlOptions2: FGraphqlOptions = {
257
257
likes : ( ) => ( { } ) ,
258
258
} ,
259
259
Query : { }
260
+ } ,
261
+ options : {
262
+ extraAuthProps : [ 'asdf' ] ,
263
+ inclAllFields : false ,
264
+ inclJoinedNames : false ,
265
+ inclAllFieldsClient : true ,
266
+ inclAllFieldsServer : true ,
267
+ skipHookWhen : ( context ) => { context . data ; return false }
260
268
}
261
269
} ;
262
270
// $ExpectType Hook
You can’t perform that action at this time.
0 commit comments