File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed
postgraphile/website/postgraphile Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " grafserv " : patch
3+ ---
4+
5+ Export ` getBodyFromFrameworkBody ` helper, and a number of types.
Original file line number Diff line number Diff line change @@ -4,19 +4,35 @@ export {
44 GrafservBase ,
55} from "./core/base.js" ;
66export type {
7+ BufferResult ,
8+ BufferStreamResult ,
9+ ErrorResult ,
10+ EventStreamHeandlerResult ,
711 GrafservBody ,
812 GrafservBodyBuffer ,
913 GrafservBodyJSON ,
1014 GrafservBodyText ,
1115 GrafservConfig ,
16+ GraphQLHandlerResult ,
17+ GraphQLIncrementalHandlerResult ,
18+ HandlerResult ,
19+ HTMLHandlerResult ,
20+ JSONObject ,
21+ JSONResult ,
22+ JSONValue ,
23+ NoContentHandlerResult ,
24+ NoContentResult ,
1225 NormalizedRequestDigest ,
1326 ParsedGraphQLBody ,
1427 ProcessGraphQLRequestBodyEvent ,
1528 RequestDigest ,
29+ Result ,
30+ TextHandlerResult ,
1631 ValidatedGraphQLBody ,
1732} from "./interfaces.js" ;
1833export { DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES } from "./middleware/graphql.js" ;
1934export {
35+ getBodyFromFrameworkBody ,
2036 getBodyFromRequest ,
2137 handleErrors ,
2238 httpError ,
Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ export function getBodyFromRequest(
107107 } ) ;
108108}
109109
110+ /**
111+ * Using this is a hack, it sniffs the data and tries to determine the type.
112+ * Really you should ask your framework of choice what type of data it has given
113+ * you.
114+ */
110115export function getBodyFromFrameworkBody ( body : unknown ) : GrafservBody {
111116 if ( typeof body === "string" ) {
112117 return {
@@ -125,7 +130,7 @@ export function getBodyFromFrameworkBody(body: unknown): GrafservBody {
125130 } ;
126131 } else {
127132 throw new Error (
128- `Grafserv Express adaptor doesn't know how to interpret this request body` ,
133+ `Grafserv adaptor doesn't know how to interpret this request body` ,
129134 ) ;
130135 }
131136}
Original file line number Diff line number Diff line change @@ -499,6 +499,7 @@ import { withPgClientTransaction } from "postgraphile/@dataplan/pg";
499499export const MyRegisterUserMutationPlugin = makeExtendSchemaPlugin ((build ) => {
500500 const { sql } = build ;
501501 const { users } = build .input .pgRegistry .pgResources ;
502+ const { executor } = users ;
502503 return {
503504 typeDefs: gql `
504505 input RegisterUserInput {
You can’t perform that action at this time.
0 commit comments