-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2335 from bryanjenningz/get-dojo-exercises-from-b…
…ackend Get exercises from backend on DOJO exercises page
- Loading branch information
Showing
5 changed files
with
303 additions
and
80 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,95 @@ | ||
import { GetExercisesQuery } from '../graphql' | ||
|
||
const getExercisesData: GetExercisesQuery = { | ||
lessons: [ | ||
{ | ||
title: 'Foundations of JavaScript', | ||
docUrl: '/curriculum/js0/primitive_data_and_operators', | ||
slug: 'js0' | ||
}, | ||
{ | ||
title: 'Variables & Functions', | ||
docUrl: '/curriculum/js1/hypertext_markup_language', | ||
slug: 'js1' | ||
}, | ||
{ | ||
title: 'Arrays', | ||
docUrl: '/curriculum/js2/introduction_to_testing_inner_properties', | ||
slug: 'js2' | ||
}, | ||
{ | ||
title: 'Objects', | ||
docUrl: '/curriculum/js3/preflight', | ||
slug: 'js3' | ||
}, | ||
{ | ||
title: 'Front End Engineering', | ||
docUrl: '/curriculum/js4/interactive_elements', | ||
slug: 'js4' | ||
}, | ||
{ | ||
title: 'End To End', | ||
docUrl: '/curriculum/js5/request_and_response', | ||
slug: 'js5' | ||
}, | ||
{ | ||
title: 'React, GraphQL, SocketIO', | ||
docUrl: '', | ||
slug: 'js6' | ||
}, | ||
{ | ||
title: 'JavaScript Algorithms', | ||
docUrl: | ||
'https://docs.google.com/document/d/1ekuu6VbN7qqypm71cVHT-BkdxYSwY0BBHLK8xGXSN1U/edit', | ||
slug: 'js7' | ||
}, | ||
{ | ||
title: 'Trees', | ||
docUrl: '', | ||
slug: 'js8' | ||
}, | ||
{ | ||
title: 'General Algorithms', | ||
docUrl: '', | ||
slug: 'js9' | ||
} | ||
], | ||
alerts: [], | ||
exercises: [ | ||
{ | ||
module: { | ||
name: 'Numbers', | ||
lesson: { | ||
slug: 'js0' | ||
} | ||
}, | ||
description: '```\nlet a = 5\na = a + 10\n// what is a?\n```', | ||
answer: '15', | ||
explanation: 'You can reassign variables that were created with "let".' | ||
}, | ||
{ | ||
module: { | ||
name: 'Numbers', | ||
lesson: { | ||
slug: 'js0' | ||
} | ||
}, | ||
description: '```\nlet a = 1\na += 2\n// what is a?\n```', | ||
answer: '3', | ||
explanation: '`a += 2` is a shorter way to write `a = a + 2`' | ||
}, | ||
{ | ||
module: { | ||
name: 'Numbers', | ||
lesson: { | ||
slug: 'js0' | ||
} | ||
}, | ||
description: '```\nlet a = 1\na -= 2\n// what is a?\n```', | ||
answer: '-1', | ||
explanation: '`a -= 2` is a shorter way to write `a = a - 2`' | ||
} | ||
] | ||
} | ||
|
||
export default getExercisesData |
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
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,31 @@ | ||
import { gql } from '@apollo/client' | ||
|
||
const GET_EXERCISES = gql` | ||
query GetExercises { | ||
lessons { | ||
title | ||
docUrl | ||
slug | ||
} | ||
alerts { | ||
id | ||
text | ||
type | ||
url | ||
urlCaption | ||
} | ||
exercises { | ||
module { | ||
name | ||
lesson { | ||
slug | ||
} | ||
} | ||
description | ||
answer | ||
explanation | ||
} | ||
} | ||
` | ||
|
||
export default GET_EXERCISES |
Oops, something went wrong.
27b9d46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
c0d3-app – ./
c0d3-app.vercel.app
c0d3-app-c0d3-prod.vercel.app
www.c0d3.com
c0d3-app-git-master-c0d3-prod.vercel.app
v2.c0d3.app