diff --git a/.meshrc.yml b/.meshrc.yml index 865d38f..dd60acd 100644 --- a/.meshrc.yml +++ b/.meshrc.yml @@ -1,6 +1,6 @@ serve: endpoint: /api -additionalEnvelopPlugins: "./src/envelopePlugin.js" +additionalEnvelopPlugins: "./src/envelopePlugin.ts" sources: - name: Directus handler: diff --git a/src/envelopePlugin.js b/src/envelopePlugin.ts similarity index 90% rename from src/envelopePlugin.js rename to src/envelopePlugin.ts index c1af02d..fcc3c06 100644 --- a/src/envelopePlugin.js +++ b/src/envelopePlugin.ts @@ -6,7 +6,7 @@ type UserType = { id: string } -const resolveUserFn = async context => { +const resolveUserFn = async (context: any) => { const authHeader = context.req.headers.authorization; const authtoken = process.env.GRAPHQL_MESH if (authHeader !== authtoken) {