Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SPP 2143 Learning Through Connecting
ltc_website
Commits
ad59df7f
Commit
ad59df7f
authored
Aug 23, 2021
by
Elisabeth Reuhl
Browse files
Add entityTypes variable to query (issue
#81
)
parent
5fa8ece1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/components/AppContent/AppContent.jsx
View file @
ad59df7f
...
@@ -43,7 +43,8 @@ const initialInput = {
...
@@ -43,7 +43,8 @@ const initialInput = {
highlightedTimelineObject
:
undefined
,
highlightedTimelineObject
:
undefined
,
areaA
:
1
,
areaA
:
1
,
areaB
:
0
,
areaB
:
0
,
bigTileArea
:
""
bigTileArea
:
""
,
arachneTypes
:
[
"
Einzelobjekte
"
,
"
Topographien
"
,
"
Bilder
"
]
};
};
...
@@ -119,10 +120,11 @@ export const AppContent = () => {
...
@@ -119,10 +120,11 @@ export const AppContent = () => {
bbox
:
(
/-
?\d{1,2}\.\d
+,-
?\d{1,3}\.\d
+/
.
test
(
input
.
boundingBoxCorner1
))
&&
(
/-
?\d{1,2}\.\d
+,-
?\d{1,3}\.\d
+/
.
test
(
input
.
boundingBoxCorner2
))
bbox
:
(
/-
?\d{1,2}\.\d
+,-
?\d{1,3}\.\d
+/
.
test
(
input
.
boundingBoxCorner1
))
&&
(
/-
?\d{1,2}\.\d
+,-
?\d{1,3}\.\d
+/
.
test
(
input
.
boundingBoxCorner2
))
?
input
.
boundingBoxCorner1
.
concat
(
input
.
boundingBoxCorner2
)
?
input
.
boundingBoxCorner1
.
concat
(
input
.
boundingBoxCorner2
)
:
[],
:
[],
periodTerm
:
input
.
chronOntologyTerm
periodTerm
:
input
.
chronOntologyTerm
,
entityTypes
:
input
.
arachneTypes
}
}
}
}
:
{
variables
:
{
searchTerm
:
""
,
catalogIds
:
[],
bbox
:
[],
periodTerm
:
""
}});
:
{
variables
:
{
searchTerm
:
""
,
catalogIds
:
[],
bbox
:
[],
periodTerm
:
""
,
entityTypes
:
[]
}});
const
{
data
:
dataArchaeoSites
,
loading
:
loadingArchaeoSites
,
error
:
errorArchaeoSites
}
=
useQuery
(
GET_ARCHAEOLOGICAL_SITES
,
input
.
mode
===
"
archaeoSites
"
const
{
data
:
dataArchaeoSites
,
loading
:
loadingArchaeoSites
,
error
:
errorArchaeoSites
}
=
useQuery
(
GET_ARCHAEOLOGICAL_SITES
,
input
.
mode
===
"
archaeoSites
"
?
{
?
{
...
...
src/components/AppContent/queries.graphql
View file @
ad59df7f
query
searchObjects
(
$searchTerm
:
String
,
$catalogIds
:
[
Int
],
$bbox
:
[
String
],
$periodTerm
:
String
)
{
query
searchObjects
(
$searchTerm
:
String
,
$catalogIds
:
[
Int
],
$bbox
:
[
String
],
$periodTerm
:
String
,
$entityTypes
:
[
RelatedType
]
)
{
entitiesMultiFilter
(
searchString
:
$searchTerm
,
catalogIds
:
$catalogIds
,
coordinates
:
$bbox
,
period
:
$periodTerm
,
entitiesMultiFilter
(
searchString
:
$searchTerm
,
catalogIds
:
$catalogIds
,
coordinates
:
$bbox
,
period
:
$periodTerm
,
entityTypes
:
[
Einzelobjekte
,
Topographien
,
Bilder
]
)
{
entityTypes
:
$entityTypes
)
{
identifier
identifier
name
name
spatial
{
spatial
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment