Skip to content

Commit 9fb9705

Browse files
authored
Merge pull request #37 from constructive-io/fix/meta-client-use-meta-schema
fix(fn-runtime): meta client must use X-Meta-Schema, not X-Api-Name
2 parents c0ebc1c + 9269815 commit 9fb9705

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/fn-runtime/src/graphql.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ export const createClients = (
6161
...(schemata && { schemata })
6262
});
6363

64+
// Meta client targets platform-level data (databases, sites, domains, themes
65+
// in metaschema_public). It must NOT use tenant API routing — sending
66+
// X-Api-Name causes the server to load every schema registered for that API
67+
// (both *_public and *_private variants), which collides on duplicate codec
68+
// names like identityProviders. Use X-Meta-Schema instead.
6469
const meta = createGraphQLClient(metaGraphqlUrl, env, {
6570
hostHeaderEnvVar: 'META_GRAPHQL_HOST_HEADER',
66-
databaseId,
67-
...(apiName && { apiName }),
68-
...(schemata && { schemata })
71+
useMetaSchema: true,
6972
});
7073

7174
return { client, meta };

0 commit comments

Comments
 (0)