@@ -420,7 +420,7 @@ export default gql`
420
420
}
421
421
422
422
"""
423
- Describes a schema change for either a schema version (\` SchemaVersion\` ) or schema check (\` SchemaCheck\` ).
423
+ Describes a schema change for either a schema version (' SchemaVersion' ) or schema check (' SchemaCheck' ).
424
424
"""
425
425
type SchemaChange {
426
426
criticality: CriticalityLevel!
@@ -433,11 +433,11 @@ export default gql`
433
433
)
434
434
"""
435
435
The severity level of this schema change.
436
- Note: A schema change with the impact \` SeverityLevelType.BREAKING\` can still be safe based on the usage (\` SchemaChange.isSafeBasedOnUsage\` ).
436
+ Note: A schema change with the impact ' SeverityLevelType.BREAKING' can still be safe based on the usage (' SchemaChange.isSafeBasedOnUsage' ).
437
437
"""
438
438
severityLevel: SeverityLevelType! @tag(name: "public")
439
439
"""
440
- The reason for the schema changes severity level (\` SchemaChange.severityLevel\` )
440
+ The reason for the schema changes severity level (' SchemaChange.severityLevel' )
441
441
"""
442
442
severityReason: String @tag(name: "public")
443
443
"""
@@ -746,6 +746,13 @@ export default gql`
746
746
pageInfo: PageInfo! @tag(name: "public")
747
747
}
748
748
749
+ input SchemaExplorerPeriodInput @oneOf {
750
+ """
751
+ A full range using a start and end date.
752
+ """
753
+ absoluteRange: DateRangeInput @tag(name: "public")
754
+ }
755
+
749
756
type SchemaVersion {
750
757
id: ID! @tag(name: "public")
751
758
"""
@@ -796,8 +803,29 @@ export default gql`
796
803
Experimental: This field is not stable and may change in the future.
797
804
"""
798
805
explorer(usage: SchemaExplorerUsageInput): SchemaExplorer
799
- unusedSchema(usage: UnusedSchemaExplorerUsageInput): UnusedSchemaExplorer
800
- deprecatedSchema(usage: DeprecatedSchemaExplorerUsageInput): DeprecatedSchemaExplorer
806
+ """
807
+ An overview of unused fields and their types within the GraphQL schema.
808
+ """
809
+ unusedSchema(
810
+ """
811
+ The period to use in order to determind whether a field is unused.
812
+ A field is unused if it has not been requested within the specified period.
813
+
814
+ Defaults to the last 30 days by default.
815
+ """
816
+ period: SchemaExplorerPeriodInput @tag(name: "public")
817
+ ): UnusedSchemaExplorer @tag(name: "public")
818
+ """
819
+ An overview of deprecated fields and types with their usage in the GraphQL schema.
820
+ """
821
+ deprecatedSchema(
822
+ """
823
+ The period for which the usage data should be included within the result.
824
+
825
+ Defaults to the last 30 days by default.
826
+ """
827
+ period: SchemaExplorerPeriodInput @tag(name: "public")
828
+ ): DeprecatedSchemaExplorer @tag(name: "public")
801
829
802
830
schemaCompositionErrors: SchemaErrorConnection @tag(name: "public")
803
831
@@ -846,14 +874,6 @@ export default gql`
846
874
period: DateRangeInput!
847
875
}
848
876
849
- input UnusedSchemaExplorerUsageInput {
850
- period: DateRangeInput!
851
- }
852
-
853
- input DeprecatedSchemaExplorerUsageInput {
854
- period: DateRangeInput!
855
- }
856
-
857
877
type MetadataAttribute {
858
878
name: String!
859
879
values: [String!]!
@@ -873,30 +893,66 @@ export default gql`
873
893
supergraphMetadata: SupergraphMetadata
874
894
}
875
895
896
+ """
897
+ Explorer for navigating unused schema parts within the contextual provided period.
898
+ """
876
899
type UnusedSchemaExplorer {
877
- types: [GraphQLNamedType!]!
900
+ """
901
+ The affected unused types and their fields/values/members etc.
902
+
903
+ The types within the result only contain unused fields/values/members, all other entities are excluded,
904
+ they are not a representation of the full GraphQL schema.
905
+ """
906
+ types: [GraphQLNamedType!]! @tag(name: "public")
878
907
}
879
908
909
+ """
910
+ Explorer for navigating the deprecated schema parts with usage data provided by the contextual period.
911
+ """
880
912
type DeprecatedSchemaExplorer {
881
- types: [GraphQLNamedType!]!
913
+ """
914
+ The affected types whose fields/values/members are deprecated.
915
+
916
+ The types within the result only contain deprecated fields/values/members, all other entities are excluded,
917
+ they are not a representation of the full GraphQL schema.
918
+ """
919
+ types: [GraphQLNamedType!]! @tag(name: "public")
882
920
}
883
921
884
- type SchemaCoordinateUsage {
922
+ """
923
+ Information about the schema coordinate usage within the contextual period.
924
+ """
925
+ type SchemaCoordinateUsage @tag(name: "public") {
926
+ """
927
+ The total amount of usages of the schema coordinate within the contextual period.
928
+ """
885
929
total: Float!
930
+ """
931
+ Whether the schema coordinate is used within the contextual period.
932
+ """
886
933
isUsed: Boolean!
887
934
"""
888
935
A list of clients that use this schema coordinate within GraphQL operation documents.
889
936
Is null if used by none clients.
890
937
"""
891
938
usedByClients: [String!]
939
+ """
940
+ The top operations executed for this schema coordinate within the contextual period.
941
+ """
892
942
topOperations(limit: Int!): [SchemaCoordinateUsageOperation!]!
893
943
}
894
944
895
- type SchemaCoordinateUsageOperation {
945
+ type SchemaCoordinateUsageOperation @tag(name: "public") {
946
+ """
947
+ The name of the GraphQL operation.
948
+ """
896
949
name: String!
950
+ """
951
+ The hash of the GraphQL operation
952
+ """
897
953
hash: String!
898
954
"""
899
- The number of times the operation was called.
955
+ The number of times the operation was called within the contextual period .
900
956
"""
901
957
count: Float!
902
958
}
@@ -907,7 +963,7 @@ export default gql`
907
963
List of service names that own the field/type.
908
964
Resolves to null if the entity (field, type, scalar) does not belong to any service.
909
965
"""
910
- ownedByServiceNames: [String!]
966
+ ownedByServiceNames: [String!] @tag(name: "public")
911
967
}
912
968
913
969
type SchemaMetadata {
@@ -925,15 +981,27 @@ export default gql`
925
981
source: String
926
982
}
927
983
928
- union GraphQLNamedType =
929
- | GraphQLObjectType
930
- | GraphQLInterfaceType
931
- | GraphQLUnionType
932
- | GraphQLEnumType
933
- | GraphQLInputObjectType
934
- | GraphQLScalarType
984
+ interface GraphQLNamedType @tag(name: "public") {
985
+ """
986
+ The name of the GraphQL type.
987
+ """
988
+ name: String!
989
+ """
990
+ The description of the GraphQL type.
991
+ """
992
+ description: String
993
+ """
994
+ The usage of the type within the specified period.
995
+ """
996
+ usage: SchemaCoordinateUsage!
997
+ """
998
+ Metadata specific to Apollo Federation Projects.
999
+ Is null if no meta information is available (e.g. this is not an apollo federation project).
1000
+ """
1001
+ supergraphMetadata: SupergraphMetadata
1002
+ }
935
1003
936
- type GraphQLObjectType {
1004
+ type GraphQLObjectType implements GraphQLNamedType @tag(name: "public") {
937
1005
name: String!
938
1006
description: String
939
1007
fields: [GraphQLField!]!
@@ -946,7 +1014,7 @@ export default gql`
946
1014
supergraphMetadata: SupergraphMetadata
947
1015
}
948
1016
949
- type GraphQLInterfaceType {
1017
+ type GraphQLInterfaceType implements GraphQLNamedType @tag(name: "public") {
950
1018
name: String!
951
1019
description: String
952
1020
fields: [GraphQLField!]!
@@ -959,7 +1027,7 @@ export default gql`
959
1027
supergraphMetadata: SupergraphMetadata
960
1028
}
961
1029
962
- type GraphQLUnionType {
1030
+ type GraphQLUnionType implements GraphQLNamedType @tag(name: "public") {
963
1031
name: String!
964
1032
description: String
965
1033
members: [GraphQLUnionTypeMember!]!
@@ -971,7 +1039,7 @@ export default gql`
971
1039
supergraphMetadata: SupergraphMetadata
972
1040
}
973
1041
974
- type GraphQLUnionTypeMember {
1042
+ type GraphQLUnionTypeMember @tag(name: "public") {
975
1043
name: String!
976
1044
usage: SchemaCoordinateUsage!
977
1045
"""
@@ -981,7 +1049,7 @@ export default gql`
981
1049
supergraphMetadata: SupergraphMetadata
982
1050
}
983
1051
984
- type GraphQLEnumType {
1052
+ type GraphQLEnumType implements GraphQLNamedType @tag(name: "public") {
985
1053
name: String!
986
1054
description: String
987
1055
deprecationReason: String
@@ -994,7 +1062,7 @@ export default gql`
994
1062
supergraphMetadata: SupergraphMetadata
995
1063
}
996
1064
997
- type GraphQLInputObjectType {
1065
+ type GraphQLInputObjectType implements GraphQLNamedType @tag(name: "public") {
998
1066
name: String!
999
1067
description: String
1000
1068
fields: [GraphQLInputField!]!
@@ -1006,7 +1074,7 @@ export default gql`
1006
1074
supergraphMetadata: SupergraphMetadata
1007
1075
}
1008
1076
1009
- type GraphQLScalarType {
1077
+ type GraphQLScalarType implements GraphQLNamedType @tag(name: "public") {
1010
1078
name: String!
1011
1079
description: String
1012
1080
usage: SchemaCoordinateUsage!
@@ -1017,7 +1085,7 @@ export default gql`
1017
1085
supergraphMetadata: SupergraphMetadata
1018
1086
}
1019
1087
1020
- type GraphQLField {
1088
+ type GraphQLField @tag(name: "public") {
1021
1089
name: String!
1022
1090
description: String
1023
1091
type: String!
@@ -1032,7 +1100,7 @@ export default gql`
1032
1100
supergraphMetadata: SupergraphMetadata
1033
1101
}
1034
1102
1035
- type GraphQLInputField {
1103
+ type GraphQLInputField @tag(name: "public") {
1036
1104
name: String!
1037
1105
description: String
1038
1106
type: String!
@@ -1047,7 +1115,7 @@ export default gql`
1047
1115
supergraphMetadata: SupergraphMetadata
1048
1116
}
1049
1117
1050
- type GraphQLArgument {
1118
+ type GraphQLArgument @tag(name: "public") {
1051
1119
name: String!
1052
1120
description: String
1053
1121
type: String!
@@ -1057,7 +1125,7 @@ export default gql`
1057
1125
usage: SchemaCoordinateUsage!
1058
1126
}
1059
1127
1060
- type GraphQLEnumValue {
1128
+ type GraphQLEnumValue @tag(name: "public") {
1061
1129
name: String!
1062
1130
description: String
1063
1131
isDeprecated: Boolean!
0 commit comments