/** * GraphQL resolver maps (change: add-contract-graph-projection, GraphQL phase). * * A schema-first GraphQL server names the function behind each root field in ONE literal place: * * JS/TS const resolvers = { Query: { order: getOrder, orders(parent, args) { … } } } * const Query = { order: getOrder } (spread into `resolvers` later) * Python query = QueryType() @query.field("order")\ndef resolve_order(…): … * query.set_field("orders", resolve_orders) (Ariadne; also ObjectType("Query")) * * That literal is the evidence an `implements_endpoint` edge rests on. No name similarity: a * function named `order` that no map names binds nothing. Scanning is a regex pass over source with * comments and strings blanked (`maskNonCode`), so a map written in a comment or a test fixture's * string is not read; the field names Python writes as strings are read back from the original * text at the same offsets, which masking preserves. Code-first servers (Strawberry, Graphene, * Nexus, gqlgen) have no such map and are a disclosed boundary. */ export type ResolverRuntime = 'node' | 'python'; export interface ResolverEntry { /** The root field the entry resolves. */ field: string; /** The function it names; absent when written inline (an arrow function, a lambda). */ fn?: string; /** The function is imported into the map's file: it is looked for only in the module named. */ imported?: true; /** JS/TS: the import's module specifier (`./orders`). */ from?: string; /** Python: the imported module (`.resolvers`, `app.resolvers`). */ module?: string; /** Why a named function is not followed (a default import names no exported function). */ notFollowed?: string; line: number; } export interface ResolverMap { file: string; line: number; runtime: ResolverRuntime; /** The root type the map resolves (`Query`), as written. */ root: string; entries: ResolverEntry[]; /** Why the map is not literal (a spread, a computed key), when it is not. */ notLiteral?: string; } /** * Whether a source file writes a schema of its own inline (a root type in a `typeDefs` / `gql` / * `buildSchema` string). Its maps — and those beside it in its directory — serve that schema. */ export declare function hasInlineSdl(content: string): boolean; /** * Every resolver map for the given root type names in one source file. `roots` comes from the * schema (its `schema { query: … }` block, or the default names), so a map is read only for a root * the schema actually has. */ export declare function scanResolverMaps(file: string, content: string, roots: readonly string[]): ResolverMap[]; //# sourceMappingURL=graphql-resolvers.d.ts.map