Skip to content

Release/file support for graphql handler#305

Merged
romario-0 merged 9 commits into
mainfrom
release/file-support-for-graphql-handler
May 14, 2026
Merged

Release/file support for graphql handler#305
romario-0 merged 9 commits into
mainfrom
release/file-support-for-graphql-handler

Conversation

@romario-0
Copy link
Copy Markdown
Collaborator

File support for graphql handler

Description

Graphql file path added to source attribute in graphql handler, will build the mesh with mentioned schema file

Related Issue

CEXT-6144

Motivation and Context

When GraphQL introspection is disabled for a source, the schema needs to be supplied manually for mesh generation. To improve readability and maintenance of large schema definitions, support for external schema files has been added, enabling schemas to be organized separately and mapped through the config file.

How Has This Been Tested?

Test this with a graphql source with disabled introspection
(endpoint: https://test-graphql-limit.apimesh-adobe-test.workers.dev/graphql)

Add the following files and using the cli create or update or run mesh.json

mesh.json
{ "meshConfig": { "sources": [ { "name": "QueryLimit", "handler": { "graphql": { "endpoint": "https://test-graphql-limit.apimesh-adobe-test.workers.dev/graphql", "source": "./schemas/schema.graphql" } } } ] } }

schemas/schema.graphql
`type Query {
users: [User!]!
user(id: ID!): User
posts: [Post!]!
post(id: ID!): Post
}

type User {
id: ID!
name: String!
age: Int!
posts: [Post!]!
}

type Post {
id: ID!
title: String!
body: String!
author: User!
comments: [Comment!]!
}

type Comment {
id: ID!
text: String!
post: Post!
author: User!
}`

Result:
The mesh build should successful

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Copy Markdown

@macytd macytd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@romario-0 romario-0 merged commit 8113697 into main May 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants