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

Remove unused scalars from SDL #1423

Merged
merged 24 commits into from
Feb 21, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/GraphQL.ApiTests/ApiApprovalTests.PublicApi.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ namespace GraphQL
public static bool IsSubtypeOf(this GraphQL.Types.IGraphType maybeSubType, GraphQL.Types.IGraphType superType, GraphQL.Types.ISchema schema) { }
public static System.Collections.Generic.IEnumerable<string> IsValidLiteralValue(this GraphQL.Types.IGraphType type, GraphQL.Language.AST.IValue valueAst, GraphQL.Types.ISchema schema) { }
public static string NameOf<TSourceType, TProperty>(this System.Linq.Expressions.Expression<System.Func<TSourceType, TProperty>> expression) { }
public static bool References(this GraphQL.Types.ISchema schema, string typeName) { }
public static string TrimGraphQLTypes(this string name) { }
public static TMetadataProvider WithMetadata<TMetadataProvider>(this TMetadataProvider provider, string key, object value)
where TMetadataProvider : GraphQL.Types.IProvideMetadata { }
Expand Down Expand Up @@ -2348,7 +2349,7 @@ namespace GraphQL.Utilities
public class SchemaPrinterOptions
{
public SchemaPrinterOptions() { }
public System.Collections.Generic.List<string> CustomScalars { get; set; }
public bool IncludeAllTypes { get; set; }
public bool IncludeDeprecationReasons { get; set; }
public bool IncludeDescriptions { get; set; }
public bool OldImplementsSyntax { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions src/GraphQL.StarWars/IoC/SimpleContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public void Register<TService>()
_registrations.Add(typeof(TService),
() =>
{
var implType = typeof (TImpl);
return typeof (TService) == implType
var implType = typeof(TImpl);
return typeof(TService) == implType
? CreateInstance(implType)
: Get(implType);
});
Expand All @@ -54,7 +54,7 @@ public void Singleton<TService>(Func<TService> instanceCreator)

public T Get<T>()
{
return (T)Get(typeof (T));
return (T)Get(typeof(T));
}

public object Get(Type serviceType)
Expand Down
96 changes: 0 additions & 96 deletions src/GraphQL.Tests/Execution/RegisteredInstanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,42 +109,10 @@ public void build_nested_type_with_list()
query: root
}

scalar BigInt

scalar Byte

scalar Date

scalar DateTime

scalar DateTimeOffset

scalar Decimal

scalar Guid

scalar Long

scalar Milliseconds

type NestedObjType {
intField: Int
}

scalar SByte

scalar Seconds

scalar Short

scalar UInt

scalar ULong

scalar UShort

scalar Uri

type root {
listOfObjField: [NestedObjType]
}
Expand All @@ -158,42 +126,10 @@ public void build_nested_type_with_non_null()
query: root
}

scalar BigInt

scalar Byte

scalar Date

scalar DateTime

scalar DateTimeOffset

scalar Decimal

scalar Guid

scalar Long

scalar Milliseconds

type NestedObjType {
intField: Int
}

scalar SByte

scalar Seconds

scalar Short

scalar UInt

scalar ULong

scalar UShort

scalar Uri

type root {
listOfObjField: NestedObjType!
}
Expand All @@ -207,42 +143,10 @@ public void build_nested_type_with_base()
query: root
}

scalar BigInt

scalar Byte

scalar Date

scalar DateTime

scalar DateTimeOffset

scalar Decimal

scalar Guid

scalar Long

scalar Milliseconds

type NestedObjType {
intField: Int
}

scalar SByte

scalar Seconds

scalar Short

scalar UInt

scalar ULong

scalar UShort

scalar Uri

type root {
listOfObjField: NestedObjType
}
Expand Down
190 changes: 0 additions & 190 deletions src/GraphQL.Tests/Introspection/IntrospectionResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,196 +32,6 @@ public class IntrospectionResult
""enumValues"": null,
""possibleTypes"": null
},
{
sungam3r marked this conversation as resolved.
Show resolved Hide resolved
""kind"": ""SCALAR"",
""name"": ""Float"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Int"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""ID"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Date"",
""description"": ""The `Date` scalar type represents a year, month and day in accordance with the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) standard."",
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""DateTime"",
""description"": ""The `DateTime` scalar type represents a date and time. `DateTime` expects timestamps to be formatted in accordance with the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) standard."",
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""DateTimeOffset"",
""description"": ""The `DateTimeOffset` scalar type represents a date, time and offset from UTC. `DateTimeOffset` expects timestamps to be formatted in accordance with the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) standard."",
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Seconds"",
""description"": ""The `Seconds` scalar type represents a period of time represented as the total number of seconds."",
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Milliseconds"",
""description"": ""The `Milliseconds` scalar type represents a period of time represented as the total number of milliseconds."",
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Decimal"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Uri"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Guid"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Short"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""UShort"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""UInt"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Long"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""BigInt"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""ULong"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""Byte"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""SCALAR"",
""name"": ""SByte"",
""description"": null,
""fields"": null,
""inputFields"": null,
""interfaces"": null,
""enumValues"": null,
""possibleTypes"": null
},
{
""kind"": ""OBJECT"",
""name"": ""__Schema"",
Expand Down