Skip to content

Commit

Permalink
Fixing fragment definition generation when not generating operation d…
Browse files Browse the repository at this point in the history
…efinitions (#218)
  • Loading branch information
BobaFetters authored and gh-action-runner committed Jan 16, 2024
1 parent 1e69e83 commit 79dbcd0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/ApolloAPI/FragmentProtocols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ public protocol Fragment: SelectionSet, Deferrable {
static var fragmentDefinition: StaticString { get }
}

/// Extension providing default implementation for the ``Fragment`` protocol.
extension Fragment {
// Default implementation for the `fragmentDefinition` variable
public static var fragmentDefinition: StaticString {
return ""
}
}

/// A protocol representing a container for the fragments on a generated ``SelectionSet``.
///
/// A generated ``FragmentContainer`` includes generated properties for converting the
Expand Down

0 comments on commit 79dbcd0

Please sign in to comment.