Skip to content

Commit 15ed816

Browse files
Update gitignore
1 parent 1b9d041 commit 15ed816

File tree

6 files changed

+293
-285
lines changed

6 files changed

+293
-285
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
2-
.idea
2+
.idea
3+
go*.tar.gz

examples/http/main.go

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ type user struct {
1717
var data map[string]user
1818

1919
/*
20-
Create User object type with fields "id" and "name" by using GraphQLObjectTypeConfig:
21-
- Name: name of object type
22-
- Fields: a map of fields by using GraphQLFields
23-
Setup type of field use GraphQLFieldConfig
20+
Create User object type with fields "id" and "name" by using GraphQLObjectTypeConfig:
21+
- Name: name of object type
22+
- Fields: a map of fields by using GraphQLFields
23+
24+
Setup type of field use GraphQLFieldConfig
2425
*/
2526
var userType = graphql.NewObject(
2627
graphql.ObjectConfig{
@@ -37,13 +38,14 @@ var userType = graphql.NewObject(
3738
)
3839

3940
/*
40-
Create Query object type with fields "user" has type [userType] by using GraphQLObjectTypeConfig:
41-
- Name: name of object type
42-
- Fields: a map of fields by using GraphQLFields
43-
Setup type of field use GraphQLFieldConfig to define:
44-
- Type: type of field
45-
- Args: arguments to query with current field
46-
- Resolve: function to query data using params from [Args] and return value with current type
41+
Create Query object type with fields "user" has type [userType] by using GraphQLObjectTypeConfig:
42+
- Name: name of object type
43+
- Fields: a map of fields by using GraphQLFields
44+
45+
Setup type of field use GraphQLFieldConfig to define:
46+
- Type: type of field
47+
- Args: arguments to query with current field
48+
- Resolve: function to query data using params from [Args] and return value with current type
4749
*/
4850
var queryType = graphql.NewObject(
4951
graphql.ObjectConfig{
@@ -97,7 +99,7 @@ func main() {
9799
http.ListenAndServe(":8080", nil)
98100
}
99101

100-
//Helper function to import json from file to map
102+
// Helper function to import json from file to map
101103
func importJSONDataFromFile(fileName string, result interface{}) (isOK bool) {
102104
isOK = true
103105
content, err := ioutil.ReadFile(fileName)

0 commit comments

Comments
 (0)