Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@ internal sealed class CodeWriter(StringBuilder sb)

public void WriteLine(string line)
{
for (var i = 0; i < _indent; i++)
if (line.Length != 0)
{
sb.Append(" ");
for (var i = 0; i < _indent; i++)
{
sb.Append(" ");
}
}

sb.AppendLine(line);
}

public void WriteLine(string format, params object[] args)
{
for (var i = 0; i < _indent; i++)
if (format.Length != 0)
{
sb.Append(" ");
for (var i = 0; i < _indent; i++)
{
sb.Append(" ");
}
}

sb.AppendFormat(format, args).AppendLine();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ sourceSchemas:
schema {
query: Query
}

interface SharedType {
id: Int!
}

type Author implements SharedType {
id: Int!
name: String!
}

type Discussion implements SharedType {
id: Int!
title: String!
}

"A connection to a list of items."
type InterfaceConnectionConnection {
"Information to aid in pagination."
Expand All @@ -52,15 +52,15 @@ sourceSchemas:
"A flattened list of the nodes."
nodes: [SharedType!]
}

"An edge in a connection."
type InterfaceConnectionEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: SharedType!
}

"Information about pagination in a connection."
type PageInfo {
"Indicates whether more edges exist following the set defined by the clients arguments."
Expand All @@ -72,11 +72,11 @@ sourceSchemas:
"When paginating forwards, the cursor to continue."
endCursor: String
}

type Product implements SharedType {
id: Int!
}

type Query {
abstractType: SharedType!
otherAbstractType: SharedType!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ sourceSchemas:
schema {
query: Query
}

interface SharedType {
id: Int!
}

type Author implements SharedType {
id: Int!
name: String!
}

type Discussion implements SharedType {
id: Int!
title: String!
}

"A connection to a list of items."
type InterfaceConnectionConnection {
"Information to aid in pagination."
Expand All @@ -61,15 +61,15 @@ sourceSchemas:
"A flattened list of the nodes."
nodes: [SharedType!]
}

"An edge in a connection."
type InterfaceConnectionEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: SharedType!
}

"Information about pagination in a connection."
type PageInfo {
"Indicates whether more edges exist following the set defined by the clients arguments."
Expand All @@ -81,7 +81,7 @@ sourceSchemas:
"When paginating forwards, the cursor to continue."
endCursor: String
}

type Query {
abstractType: SharedType!
otherAbstractType: SharedType!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ sourceSchemas:
schema {
query: Query
}

interface SharedType {
id: Int!
}

type Author implements SharedType {
id: Int!
name: String!
}

type Discussion implements SharedType {
id: Int!
title: String!
}

"A connection to a list of items."
type InterfaceConnectionConnection {
"Information to aid in pagination."
Expand All @@ -51,15 +51,15 @@ sourceSchemas:
"A flattened list of the nodes."
nodes: [SharedType!]
}

"An edge in a connection."
type InterfaceConnectionEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: SharedType!
}

"Information about pagination in a connection."
type PageInfo {
"Indicates whether more edges exist following the set defined by the clients arguments."
Expand All @@ -71,11 +71,11 @@ sourceSchemas:
"When paginating forwards, the cursor to continue."
endCursor: String
}

type Product implements SharedType {
id: Int!
}

type Query {
abstractType: SharedType!
otherAbstractType: SharedType!
Expand Down Expand Up @@ -113,21 +113,21 @@ sourceSchemas:
schema {
query: Query
}

interface OtherInterface {
id: Int!
}

type Author implements OtherInterface {
id: Int!
age: Int!
}

type Discussion {
id: Int!
commentCount: Int!
}

type Query {
otherInterface(id: Int!): OtherInterface! @lookup
discussionById(id: ID!): Discussion @lookup @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ sourceSchemas:
schema {
query: Query
}

interface SharedType {
id: Int!
}

type Author implements SharedType {
id: Int!
name: String!
}

type Discussion implements SharedType {
id: Int!
title: String!
}

"A connection to a list of items."
type InterfaceConnectionConnection {
"Information to aid in pagination."
Expand All @@ -51,15 +51,15 @@ sourceSchemas:
"A flattened list of the nodes."
nodes: [SharedType!]
}

"An edge in a connection."
type InterfaceConnectionEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: SharedType!
}

"Information about pagination in a connection."
type PageInfo {
"Indicates whether more edges exist following the set defined by the clients arguments."
Expand All @@ -71,11 +71,11 @@ sourceSchemas:
"When paginating forwards, the cursor to continue."
endCursor: String
}

type Product implements SharedType {
id: Int!
}

type Query {
abstractType: SharedType!
otherAbstractType: SharedType!
Expand Down Expand Up @@ -113,21 +113,21 @@ sourceSchemas:
schema {
query: Query
}

interface OtherInterface {
id: Int!
}

type Author implements OtherInterface {
id: Int!
age: Int!
}

type Discussion {
id: Int!
commentCount: Int!
}

type Query {
otherInterface(id: Int!): OtherInterface! @lookup
discussionById(id: ID!): Discussion @lookup @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ sourceSchemas:
schema {
query: Query
}

interface SharedType {
id: Int!
}

type Author implements SharedType {
id: Int!
name: String!
}

type Discussion implements SharedType {
id: Int!
title: String!
}

"A connection to a list of items."
type InterfaceConnectionConnection {
"Information to aid in pagination."
Expand All @@ -47,15 +47,15 @@ sourceSchemas:
"A flattened list of the nodes."
nodes: [SharedType!]
}

"An edge in a connection."
type InterfaceConnectionEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: SharedType!
}

"Information about pagination in a connection."
type PageInfo {
"Indicates whether more edges exist following the set defined by the clients arguments."
Expand All @@ -67,11 +67,11 @@ sourceSchemas:
"When paginating forwards, the cursor to continue."
endCursor: String
}

type Product implements SharedType {
id: Int!
}

type Query {
abstractType: SharedType!
otherAbstractType: SharedType!
Expand Down Expand Up @@ -104,21 +104,21 @@ sourceSchemas:
schema {
query: Query
}

interface OtherInterface {
id: Int!
}

type Author implements OtherInterface {
id: Int!
age: Int!
}

type Discussion {
id: Int!
commentCount: Int!
}

type Query {
otherInterface(id: Int!): OtherInterface! @lookup
discussionById(id: ID!): Discussion @lookup @internal
Expand Down
Loading
Loading