Skip to content

Conversation

@Knerio
Copy link
Member

@Knerio Knerio commented Nov 22, 2025

close #521

@Knerio Knerio self-assigned this Nov 22, 2025
Copilot finished reviewing on behalf of Knerio November 22, 2025 22:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes GraphQL layer dependencies from the service layer by replacing SagittariusSchema.object_from_id calls with direct ActiveRecord database queries. This improves separation of concerns by ensuring service layer code doesn't depend on the GraphQL layer.

  • Replaced GraphQL ID resolution with direct database queries using ActiveRecord associations
  • Added missing runtime_function_definitions association to the Runtime model
  • Updated lookups to use .model_id for extracting database IDs from GraphQL global IDs

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
app/services/namespaces/projects/flows/create_service.rb Replaced GraphQL object_from_id calls with direct database queries via ActiveRecord associations for runtime functions, parameters, and data types
app/models/runtime.rb Added has_many :runtime_function_definitions association to support direct querying from the service layer

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Knerio Knerio force-pushed the 521-calling-the-graphql-layer-from-the-service-layer-is-bad-practise branch from dd57e83 to 327f3ed Compare November 22, 2025 22:34
@Knerio Knerio requested a review from Copilot November 22, 2025 22:34
@github-actions
Copy link

github-actions bot commented Nov 22, 2025

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2183404550

Status: Passed
Duration: 3 minutes

Job summaries

rspec: [ee]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12244307862/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2183404550/test_report
Finished in 19.82 seconds (files took 11.72 seconds to load)
1227 examples, 0 failures
Line Coverage: 91.19% (4171 / 4574)
[TEST PROF INFO] Time spent in factories: 00:10.930 (41.99% of total time)

rspec: [ce]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12244307858/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2183404550/test_report
Finished in 17.84 seconds (files took 9.69 seconds to load)
1180 examples, 0 failures
Line Coverage: 90.59% (4003 / 4419)
[TEST PROF INFO] Time spent in factories: 00:10.328 (44.05% of total time)

rubocop

698 files inspected, no offenses detected

Copilot finished reviewing on behalf of Knerio November 22, 2025 22:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Knerio Knerio force-pushed the 521-calling-the-graphql-layer-from-the-service-layer-is-bad-practise branch 2 times, most recently from a8cdc84 to c0009f5 Compare November 22, 2025 22:48
@Knerio Knerio requested a review from Copilot November 22, 2025 22:48
Copilot finished reviewing on behalf of Knerio November 22, 2025 22:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Knerio Knerio force-pushed the 521-calling-the-graphql-layer-from-the-service-layer-is-bad-practise branch from c0009f5 to c6e4d1e Compare November 22, 2025 23:01
@Knerio Knerio requested a review from Copilot November 22, 2025 23:11
Copilot finished reviewing on behalf of Knerio November 22, 2025 23:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Knerio Knerio force-pushed the 521-calling-the-graphql-layer-from-the-service-layer-is-bad-practise branch from c6e4d1e to 2658075 Compare November 22, 2025 23:21
@Knerio Knerio requested a review from Copilot November 22, 2025 23:21
Copilot finished reviewing on behalf of Knerio November 22, 2025 23:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Knerio Knerio force-pushed the 521-calling-the-graphql-layer-from-the-service-layer-is-bad-practise branch from 2658075 to 51826ba Compare November 22, 2025 23:25
@Knerio Knerio requested a review from Copilot November 22, 2025 23:25
Copilot finished reviewing on behalf of Knerio November 22, 2025 23:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Knerio Knerio force-pushed the 521-calling-the-graphql-layer-from-the-service-layer-is-bad-practise branch from 51826ba to d69c5a4 Compare November 22, 2025 23:33
@Knerio Knerio requested a review from Copilot November 22, 2025 23:33
Copilot finished reviewing on behalf of Knerio November 22, 2025 23:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dario Pranjic <96529060+Knerio@users.noreply.github.com>
@Knerio Knerio force-pushed the 521-calling-the-graphql-layer-from-the-service-layer-is-bad-practise branch from d69c5a4 to ef27264 Compare November 27, 2025 15:29
@raphael-goetz raphael-goetz merged commit cf4c15c into main Nov 27, 2025
1 check 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.

Calling the graphql layer from the service layer is bad practise

3 participants