code: func GlobalIDField(typeName string, idFetcher GlobalIDFetcherFn) *graphql.Field {
  	return &graphql.Field{
  		Name:        "id",
  		Description: "The ID of an object",
  		Type:        graphql.NewNonNull(graphql.ID),
  		Resolve: func(p graphql.ResolveParams) (interface{}, error) {
  			id := ""
  			if idFetcher != nil {
  				fetched, err := idFetcher(p.Source, p.Info, p.Context)
  				id = fmt.Sprintf("%v", fetched)
  				if err != nil {
  					return id, err
  				}
  			} else {
  				// try to get from p.Source (data)
  				var objMap interface{}
  				b, _ := json.Marshal(p.Source)
  				_ = json.Unmarshal(b, &objMap)
  				switch obj := objMap.(type) {
  				case map[string]interface{}:
  					if iid, ok := obj["id"]; ok {
  						id = fmt.Sprintf("%v", iid)
  					}
  				}
  			}
  			globalID := ToGlobalID(typeName, id)
  			return globalID, nil
  		},
  	}
  }
docs: /*
  Creates the configuration for an id field on a node, using `toGlobalId` to
  construct the ID from the provided typename. The type-specific ID is fetcher
  by calling idFetcher on the object, or if not provided, by accessing the `id`
  property on the object.
  */