Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Schema type renaming #276

Draft
wants to merge 11 commits into
base: feature/rename-schema-types
Choose a base branch
from

Conversation

BobaFetters
Copy link
Member

This is a rough mvp of one of the approaches to handling custom schema type names to validate path forward before cleaning up code and adding tests etc.

Copy link

netlify bot commented Feb 17, 2024

Deploy Preview for eclectic-pie-88a2ba canceled.

Name Link
🔨 Latest commit bc49804
🔍 Latest deploy log https://app.netlify.com/sites/eclectic-pie-88a2ba/deploys/65d7870df5e14d000846e173

@BobaFetters BobaFetters changed the base branch from main to codegen-delete-ccn February 22, 2024 17:42
@BobaFetters BobaFetters changed the base branch from codegen-delete-ccn to feature/rename-schema-types February 22, 2024 17:42
@BobaFetters
Copy link
Member Author

Updated this draft with the initial pass at the new IR types to represent the schema types, all changes are under the IR source folder, everything else is left over from previous iteration that will be removed/changed

Copy link
Member Author

Choose a reason for hiding this comment

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

This file should no longer be needed once this work is complete

@@ -0,0 +1,39 @@
import Foundation

public protocol NamedItem {
Copy link
Member Author

Choose a reason for hiding this comment

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

Open to different naming for this protocol.

Redid the new name handling to be on existing GraphQL schema type objects in GraphQLCompiler instead of new IR objects.
…e-types

# Conflicts:
#	apollo-ios-codegen/Sources/ApolloCodegenLib/Templates/InterfaceTemplate.swift
@@ -224,6 +224,23 @@ class EntitySelectionTree {
targetSelections.mergeIn(scopeSelections, from: source)
}

if let conditionalScopes = scopeConditions {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure why these changes are here? Not related to the work I am doing

@BobaFetters
Copy link
Member Author

Have this updated with what should be the final implementation for handling schema type renaming after going through a few iterations. Moving on to implementing tests now and will see from there if any further tweaks are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant