forked from github/codespaces-blank
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated with decoupled search function. added new dev/linkout.js scri…
…pt and example in dev. github#31
- Loading branch information
Showing
3 changed files
with
46 additions
and
21 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,16 @@ | ||
// query a local instance of the LIS GraphQL server: | ||
// https://github.com/legumeinfo/graphql-server | ||
|
||
// Note: using port 4444 since port 4000 is default for jekyll site | ||
// const domain = 'https://cicer.legumeinfo.org/services/'; | ||
// const attributes = 'gene_linkouts?genes=cicar.CDCFrontier.gnm3.ann1.Ca1g000600/json'; | ||
// const uri = domain + attributes; | ||
|
||
// A function that gets data from a GraphQL server via a POST request. | ||
// Adapted from https://graphql.org/graphql-js/graphql-clients/ | ||
function queryLinkouts(domain, queryObject) { | ||
const attributes = `${queryObject.service}?${queryObject.query}/json`; | ||
const url = domain + '/services/' + attributes; | ||
console.log(url); | ||
return fetch(url).then((response) => response.json()); | ||
} |
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