Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Commit c2c3e8f

Browse files
committed
added specifiedBy in wrapper package
1 parent 16e5962 commit c2c3e8f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

internal/wrapper/type.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,18 @@ func (t *Type) OfType() *Type {
173173
}
174174
return WrapTypeFromType(t.schema, t.typ.Elem)
175175
}
176+
177+
func (t *Type) SpecifiedBy() *string {
178+
if t.def == nil {
179+
return nil
180+
}
181+
specifiedBy := t.def.Directives.ForName("specifiedBy")
182+
if specifiedBy == nil {
183+
return nil
184+
}
185+
url := specifiedBy.Arguments.ForName("url")
186+
if url == nil {
187+
return nil
188+
}
189+
return &url.Value.Raw
190+
}

0 commit comments

Comments
 (0)