Skip to content

Commit

Permalink
renames
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Nov 11, 2024
1 parent d790595 commit e2809c8
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ object CompletionProvider {
.toList
}

def completeRootOperationNameTs(
def completeRootOperationName(
file: playground.generated.nodes.SourceFile,
insertBodyStruct: CompletionItem.InsertBodyStruct,
) = {
Expand Down Expand Up @@ -110,7 +110,7 @@ object CompletionProvider {
}

// we're definitely in an existing query, so we don't insert a brace in either case.
def completeOperationNameForTs(
def completeOperationNameFor(
q: playground.generated.nodes.RunQuery,
sf: playground.generated.nodes.SourceFile,
serviceId: Option[QualifiedIdentifier],
Expand All @@ -130,10 +130,10 @@ object CompletionProvider {
CompletionItem.InsertBodyStruct.No,
)

case None => completeRootOperationNameTs(sf, CompletionItem.InsertBodyStruct.No)
case None => completeRootOperationName(sf, CompletionItem.InsertBodyStruct.No)
}

def completeInQueryTs(
def completeInQuery(
q: playground.generated.nodes.RunQuery,
sf: playground.generated.nodes.SourceFile,
ctx: NodeContext,
Expand All @@ -149,7 +149,7 @@ object CompletionProvider {

ctx match {
case NodeContext.PathEntry.AtOperationName ^^: EmptyPath =>
completeOperationNameForTs(q, sf, resolvedServiceId)
completeOperationNameFor(q, sf, resolvedServiceId)

case NodeContext.PathEntry.AtOperationInput ^^: ctx =>
resolvedServiceId match {
Expand Down Expand Up @@ -193,7 +193,7 @@ object CompletionProvider {
.get(n.toLong)
.getOrElse(sys.error(s"Fatal error: no query at index $n"))

completeInQueryTs(q, parsedTs, rest)
completeInQuery(q, parsedTs, rest)

case NodeContext.PathEntry.AtPrelude ^^:
NodeContext.PathEntry.AtUseClause(_) ^^:
Expand All @@ -204,7 +204,7 @@ object CompletionProvider {
.map(CompletionItem.useServiceClause.tupled)

case EmptyPath =>
completeRootOperationNameTs(
completeRootOperationName(
parsedTs,
CompletionItem.InsertBodyStruct.Yes,
)
Expand Down

0 comments on commit e2809c8

Please sign in to comment.