Description Value Public fields Methods Examples
ghql fragment class
a 'Fragment' class (R6 class)
fragments
(list) list of fragments
print()
print method for the 'Fragment' class
Fragment$print(x, ...)
x
self
...
ignored
fragment()
create a fragment by name
Fragment$fragment(name, x)
name
(character) fragment name
x
(character) the fragment
nothing returned; sets fragments internally
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # make a fragment class
frag <- Fragment$new()
# define a fragment
frag$fragment('Watchers', '
fragment on Repository {
watchers(first: 3) {
edges {
node {
name
}
}
}
}')
# define another fragment
frag$fragment('Stargazers', '
fragment on Repository {
stargazers(first: 3) {
edges {
node {
name
}
}
}
}')
frag
frag$fragments
frag$fragments$Watchers
frag$fragments$Stargazers
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.