Skip to content

Conversation

@NarekA
Copy link
Contributor

@NarekA NarekA commented Oct 24, 2025

🚀 What

Swapped out the messy string concatenation for building GraphQL mutations with a proper query builder library. This follows GraphQL best practices by using structured query building instead of manual string formatting, making the code cleaner and less prone to syntax errors and injection.

💻 How

Added gql-query-builder as a dependency to handle GraphQL query construction. Refactored the deploy_chain_atomic method to use the query builder instead of manually building strings, which provides better parameter handling by properly filtering out null values and handling optional parameters.

🔬 Testing

Added a new test that validates complex GraphQL mutations with multiple dependencies. Updated existing tests to work with the cleaner query format, and all tests use regex to make sure the GraphQL structure is correct. Everything still works the same way from the outside.

@NarekA NarekA force-pushed the narek/better-graphql-query-builder branch from a4df15a to af89203 Compare October 24, 2025 00:03
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.

1 participant