-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from mununki/cleanup
- Loading branch information
Showing
20 changed files
with
1,834 additions
and
1,304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# CHANGELOG | ||
|
||
## v0.2.9 | ||
|
||
- New parser implementation https://github.com/mununki/gqlmerge/pull/35 | ||
- Fixed issue stripping descriptions and comments https://github.com/mununki/gqlmerge/pull/35 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/mununki/gqlmerge | ||
|
||
go 1.12 | ||
go 1.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
package lib | ||
|
||
import ( | ||
"os" | ||
) | ||
|
||
type BaseFileInfo struct { | ||
Filename string | ||
Line int | ||
Column int | ||
} | ||
|
||
type Schema struct { | ||
Files []*os.File | ||
SchemaDefinitions []*SchemaDefinition | ||
Types []*Type | ||
Scalars []*Scalar | ||
Enums []*Enum | ||
Interfaces []*Interface | ||
Unions []*Union | ||
Inputs []*Input | ||
DirectiveDefinitions []*DirectiveDefinition | ||
} | ||
|
||
type SchemaDefinition struct { | ||
BaseFileInfo | ||
Query *string | ||
Mutation *string | ||
Subscription *string | ||
Descriptions *[]string | ||
} | ||
|
||
type DirectiveDefinition struct { | ||
BaseFileInfo | ||
Name string | ||
Args []*Arg | ||
Repeatable bool | ||
Locations []string | ||
Descriptions *[]string | ||
} | ||
|
||
type DirectiveArg struct { | ||
Name string | ||
Value []string | ||
IsList bool | ||
Descriptions *[]string | ||
} | ||
|
||
type Directive struct { | ||
Name string | ||
DirectiveArgs []*DirectiveArg | ||
Descriptions *[]string | ||
} | ||
|
||
type Type struct { | ||
BaseFileInfo | ||
Name string | ||
Impl bool | ||
ImplTypes []string | ||
Fields []*Field | ||
Directives []*Directive | ||
Descriptions *[]string | ||
} | ||
|
||
type Arg struct { | ||
Name string | ||
Type string | ||
TypeExt *string // in case of enum e.g. admin(role: Role = ADMIN): Admin! | ||
Null bool | ||
IsList bool | ||
IsListNull bool | ||
Directives []*Directive | ||
Descriptions *[]string | ||
} | ||
|
||
type Field struct { | ||
BaseFileInfo | ||
Name string | ||
Args []*Arg | ||
Type string | ||
Null bool | ||
IsList bool | ||
IsListNull bool | ||
Directives []*Directive | ||
Descriptions *[]string | ||
Comments *[]string | ||
} | ||
|
||
type Scalar struct { | ||
BaseFileInfo | ||
Name string | ||
Directives []*Directive | ||
Descriptions *[]string | ||
Comments *[]string | ||
} | ||
|
||
type EnumValue struct { | ||
Name string | ||
Directives []*Directive | ||
Descriptions *[]string | ||
Comments *[]string | ||
} | ||
|
||
type Enum struct { | ||
BaseFileInfo | ||
Name string | ||
EnumValues []EnumValue | ||
Directives []*Directive | ||
Descriptions *[]string | ||
} | ||
|
||
type Interface struct { | ||
BaseFileInfo | ||
Name string | ||
Fields []*Field | ||
Directives []*Directive | ||
Descriptions *[]string | ||
} | ||
|
||
type Union struct { | ||
BaseFileInfo | ||
Name string | ||
Types []string | ||
Directives []*Directive | ||
Descriptions *[]string | ||
} | ||
|
||
type Input struct { | ||
BaseFileInfo | ||
Name string | ||
Fields []*Field | ||
Descriptions *[]string | ||
} |
Oops, something went wrong.